zookeepertx
Well-known Member
- Joined
- May 27, 2011
- Messages
- 589
- Office Version
- 365
- Platform
- Windows
Hello again, all.
I'm trying to get an R1C1 formula to act right for me in a macro that I'm working on and am about to tear my hair out! I know it's just a syntax error somewhere (or else I'm just not holding my mouth right) but can't find it. I've copied the syntax exactly from another macro, obviously changing the references, where the formula works perfectly.
I want column O to look at P and if P is blank, then don't put anything in O. If there is something in P, then I need a formula in O. (I'll show it below)
I also want column R to look at P and if P is blank then don't put anything in R. If there is something in P, then I need another formula in R, which I'll also show below.
It shouldn't be this hard and I KNOW one of you will spot it right away, but I've been looking at it too long and am now so mad at it, I'm never going to find it!
Anyway, here's the (apparently incorrect) code/formula I have now:
I will greatly appreciate any suggestions!
Jenny
I'm trying to get an R1C1 formula to act right for me in a macro that I'm working on and am about to tear my hair out! I know it's just a syntax error somewhere (or else I'm just not holding my mouth right) but can't find it. I've copied the syntax exactly from another macro, obviously changing the references, where the formula works perfectly.
I want column O to look at P and if P is blank, then don't put anything in O. If there is something in P, then I need a formula in O. (I'll show it below)
I also want column R to look at P and if P is blank then don't put anything in R. If there is something in P, then I need another formula in R, which I'll also show below.
It shouldn't be this hard and I KNOW one of you will spot it right away, but I've been looking at it too long and am now so mad at it, I'm never going to find it!
Anyway, here's the (apparently incorrect) code/formula I have now:
VBA Code:
lr = Range("A" & Rows.Count).End(xlUp).Row
With Range("O5:O" & lr)
.FormulaR1C1 = "=IF(ISBLANK(RC[+1]),"",ROUNDUP(RC[+1],0)*2.2046)"
With Range("R5:R" & lr)
.FormulaR1C1 = "=IF(ISBLANK(RC[-2]),"",RC[-3] - RC[-6])"
I will greatly appreciate any suggestions!
Jenny