Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
copying a cell
does anyone know an easy way to copy a cell in column 1 to column 2
only when the cell in column 2 is blank orempty? Thank you Nestor |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
copying a cell
Do alt+F11 and then Insert=Module
in that module place code like: sub copytoBlanks() Dim icol as LOng, cell as Range, rng as Range icol = 1 set rng = Range(cells(1,icol),cells(rows.count,icol).End(xlu p)) for each cell in rng if isempty(cell.offset(0,1)) then cell.offset(0,1).Value = cell.value end if Next end sub Change icol to the column you want to process. As written it processes A (source column) and B (copy to column) (icol = 1, column to right is B). go back to Excel, then do Tools=Macro=Macros, select CopyToBlanks and click run -- Regards, Tom Ogilvy "Nestor" wrote: does anyone know an easy way to copy a cell in column 1 to column 2 only when the cell in column 2 is blank orempty? Thank you Nestor |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
copying a cell
Thank you - this also worked:
=IF(ISBLANK(B3),A3,B3) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom functions calculating time arguments Help Desperate | Excel Worksheet Functions | |||
Urgent date/scheduling calc needed | Excel Worksheet Functions | |||
copying the function contained within a cell to anouther cell. | Excel Worksheet Functions | |||
Possible Lookup Table | Excel Worksheet Functions | |||
Problems copying street addresses and dates | Excel Discussion (Misc queries) |