Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I know this probably sounds like a really silly question, but Ive been racking my brains trying to figure it out. I have a Workbook_Open() , so that when the workbook opens, it controls scrolling. I also need to place a formula in several cells. My problems are these: I have a range - C7:E26 that I need to add a formula to. In the for loop, Im trying to go to each cell in the range: Dim rng as range Dim cl Dim r as range Set rng = range("C7:E26") For each cl in rng set r = range(cl.address) range(r).formula = "=IF(" & Range(r) & "="Off","Off","")" Next cl Now, I know where the problem lies, and it is in the "". This is something that has plaqued me for quite a while. The other problem is that "set r = range(cl.address)" returns a value not a range object. How can I fix this? Thank you Terry |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula help for value grater than 0 placing a name | Excel Discussion (Misc queries) | |||
Sorting Cells on letters and numbers and placing result in one of 3 columns | Excel Worksheet Functions | |||
stripping string & placing into cells | Excel Programming |