so... trying to follow here... if your cells go
A
B
C
A
B
C
A
B
C
then your n=3
so you are suggesting you can loop through them with something like (in very crude pseudocode)
for x=1 to [some upper limit]
rangeVariable = INT(x)*n:MOD(n,x)
end if
I can't have the mod part of this right...
Thanks. That is a far more concise statement.
Thanks also for the advice about selecting being inefficient. If I were to build this code again I would define the block of cells as a range variable, and then specify manipulations based on that. This would run faster, would it? This was my first...
Sorry, I didn't mean that as a knock on the original advise at ALL! You are exactly right that it was a vital and absolutely accurate account of how to carry out the syntactic function I was struggling with. I am most grateful!
I was just trying to share, above and beyond that, the extra tweak...
Thanks so much, this was VERY helpful.
Minor correction: I found when debugging the code that if you define it as a range you have to insert:
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=" & _
MyLocation.Address(RowAbsolute:=False, ColumnAbsolute:=False) _...
I'm trying to modify a bit of Excel code to work with dynamically referenced locations, and I'm stumped.
Here is the working code with non-dynamic referencing. You start by selecting a range of cells (say A1:C3), then run this code to conditionally bold some of the cells in the selected range...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.