Hello,
In my office we often get excel files with merged cells. when we unmerge them - there blank cells. To fix this problem, before we import information into the system, we do the following manual process:
Highlight columns that need to be copied down
Hit Ctrl+G
Special
Blanks
OK
In the cell type
type = then arrow up
Hit Ctrl+Enter key
this will copy everything above down in the columns
Then highlight entire file, copy and paste special - values - enter.
I tried to records macro, but the problem is we never know how many columns we will be using.
Here is code from recorded macro:
CopyDown()
Columns("A:B").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose: =False
End Sub
Any advise?
Thanks
In my office we often get excel files with merged cells. when we unmerge them - there blank cells. To fix this problem, before we import information into the system, we do the following manual process:
Highlight columns that need to be copied down
Hit Ctrl+G
Special
Blanks
OK
In the cell type
type = then arrow up
Hit Ctrl+Enter key
this will copy everything above down in the columns
I tried to records macro, but the problem is we never know how many columns we will be using.
Here is code from recorded macro:
CopyDown()
Columns("A:B").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose: =False
End Sub
Any advise?
Thanks