Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
This is a really silly questions but here it goes. I have a sheet where in a cell I have this formula: =IF(AND($C30,$A3=""),"",0) It works fine and does what I want. However, programmatically, I place the formula in the next cell down from it (just like the copy handle dragging down 1 row). This is what the macro recorder gives me: Selection.AutoFill Destination:=Range("D3:D4"), Type:=xlFillDefault Range("D3:D4").Select Which makes sense, but I cannot hard code the Cell addresses (except in the first on which is already in the cell). Programmatically, how can I increase the row number by 1? I tried this ** LOL ** but of course it did not work: ======= what a mess Sheets("Sheet3").Range("D65536").End(xlUp).Offset( 1, 0).Formula = "=IF(AND($C" & Rows(Sheets("Sheet3").Range("D65536").End(xlUp).Of fset(1, 0)) + 1 & "0,$A" & Rows(Sheets("Sheet3").Range("D65536").End(xlUp).Of fset(1, 0)) + 1 & "=""),"""",0)" Any suggestions? Thank you so much Terry V |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Programmatically add a Formula in a worksheet? | Excel Worksheet Functions | |||
Formula to get increase by 80% | Excel Worksheet Functions | |||
Increase by % Formula | New Users to Excel | |||
Number in cell increase with increase in font size. | Excel Discussion (Misc queries) | |||
Formula produces wrong result when data cells filled programmatically | Excel Programming |