Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
looking to create a macro that loops through rows and fills all blank cells
in a column with a formula that shows the value in the cell just above. for example, i want row 3 to read bottom and rows 6 & 7 to read right. row col A 1 top 2 bottom 3 4 left 5 right 6 7 8 up i thought something like the below would work, but get an "object required" error message FinalRowMAINROW = Cells(Cells.Rows.Count, "B").End(xlUp).Row For i = 2 To FinalRowMAINROW If Cells(i, 1).Value Is Null Then Cells(i, 1).FormulaR1C1 = "=R[-1]C" End If Next i |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your If..Then test should be this...
If Cells(i, 1).Value = "" Then -- Rick (MVP - Excel) "joemeshuggah" wrote in message ... looking to create a macro that loops through rows and fills all blank cells in a column with a formula that shows the value in the cell just above. for example, i want row 3 to read bottom and rows 6 & 7 to read right. row col A 1 top 2 bottom 3 4 left 5 right 6 7 8 up i thought something like the below would work, but get an "object required" error message FinalRowMAINROW = Cells(Cells.Rows.Count, "B").End(xlUp).Row For i = 2 To FinalRowMAINROW If Cells(i, 1).Value Is Null Then Cells(i, 1).FormulaR1C1 = "=R[-1]C" End If Next i |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you!!!!
"Rick Rothstein" wrote: Your If..Then test should be this... If Cells(i, 1).Value = "" Then -- Rick (MVP - Excel) "joemeshuggah" wrote in message ... looking to create a macro that loops through rows and fills all blank cells in a column with a formula that shows the value in the cell just above. for example, i want row 3 to read bottom and rows 6 & 7 to read right. row col A 1 top 2 bottom 3 4 left 5 right 6 7 8 up i thought something like the below would work, but get an "object required" error message FinalRowMAINROW = Cells(Cells.Rows.Count, "B").End(xlUp).Row For i = 2 To FinalRowMAINROW If Cells(i, 1).Value Is Null Then Cells(i, 1).FormulaR1C1 = "=R[-1]C" End If Next i |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need Array Formula for Counting Blank & Non Blank Cells (Multiple Criteria) | Excel Discussion (Misc queries) | |||
Need Formula - If blank cells | Excel Discussion (Misc queries) | |||
Formula to sum blank cells | Excel Worksheet Functions | |||
Formula Help: Add cells with certain text + cells that are blank | Excel Worksheet Functions | |||
How do i keep cells blank until the formula is used? | Excel Discussion (Misc queries) |