The codes that I have is as per below, I am trying to insert a formula in a range of cells.....help anyone
Please Login or Register to view this content.
The codes that I have is as per below, I am trying to insert a formula in a range of cells.....help anyone
Please Login or Register to view this content.
I see a couple of things. First, you should probably assign the text to the .Formula property rather than to the .Value property. Second, the end of the IfError formula should look like ",0)" rather than ");0".
You might be able to save yourself a bit of time, letting Excel do some of the work for you. Rather than using a loop to assign the formulas, assign the formula to the entire range:
Sheets("CC_ECR_RAW").Range("FW5:FW" & (sht+4)).formula = "=IFERROR(AI5/AU5,0)"
Excel is pretty smart, I think it will autoadjust the formula as it goes down.
Hi wallyeye, I used ";0" because my excel for some reason, formula uses ; instead of "," but after running the code, it changed automatically to ";" but it does work, I did user a formula rather than value but didnt change the ";" to ",". Missed that...
Learning new things everyday
This forum is awesome!!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks