Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you very much.
Works exactly as needed! Tom Ogilvy wrote: set rng1 = Activesheet.UsedRange Set rng = Range("C13",Cells(rng1(rng1.count).row,"C")) rng.Formula = "=IF(AND(D13="""",E13=""""),"""",IF(D13="""",50,40 ))" If you really want the 50 and 40 to be strings rng.Formula = "=IF(AND(D13="""",E13=""""),"""",IF(D13="""",""50" ",""40""))" if we could count on column A (as an example) to have a value in the last row you want to use you could do Set rng = Range("C13",Cells(Cells(rows.count,1).End(xlup).ro w,"C")) -- Regards, Tom Ogilvy "Slim" wrote: Hello, I'm attempting to write a macro that will insert a formula starting in cell "C13", in every row (straight down the C column), to the end of the range of the spreadsheet. The formula I want to enter is "=IF(AND(D13="",E13=""),"",IF(D13="","50","40" ))" Is there anyone that could kindly help me with this? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HELP!!! I need macro to autofill | Excel Discussion (Misc queries) | |||
Need Macro to autofill formula to last row with data | Excel Discussion (Misc queries) | |||
Autofill Macro | Excel Programming | |||
Macro, autofill formula to end of column | Excel Programming | |||
macro to autofill formula? | Excel Programming |