How do I denote values stored in columns in my macro?
I need to write a macro that will calculate a value based on one of 2
formulas. The formula is dependent on the value in another cell. How do I do this |
How do I denote values stored in columns in my macro?
if range("A1").Value 10 then
code to use formula 1 else code to use formula 2 End if -- Regards, Tom Ogilvy "Greg" wrote in message ... I need to write a macro that will calculate a value based on one of 2 formulas. The formula is dependent on the value in another cell. How do I do this |
How do I denote values stored in columns in my macro?
I need to multiply:
C7*I7*.25 How do I code the values in C7 and I7 into the formula for K7 (the column I'm writing a macro for? |
How do I denote values stored in columns in my macro?
Range("K7").Formula = "=C7*I7*.25"
if you want to do the calculation in vba v = Range("C7").Value * Range("I7").Value * 0.25 Range("K7").Value = v -- Regards, Tom Ogilvy "Greg" wrote in message ... I need to multiply: C7*I7*.25 How do I code the values in C7 and I7 into the formula for K7 (the column I'm writing a macro for? |
All times are GMT +1. The time now is 05:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com