Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The code below works great - but only once. That is, it does not move down the empty column on subsequent calls. The content is placed correctly in the first empty cell, but the code does not seem to be able to detect that here is new content in the cell and move on. Do I need to initialize a variable? I have tried testing the cell several ways: If Range("E9").Value = " " Then If Range("E9").Value = 0 Then neither detect the empty cell. Here is the code that works 'once'. Sub copyCell() 'L6 holds copy of Earned Points If Range("E9").Value = "" Then Range("E9").Value = Range("L6").Value Else Range("E9").End(xlDown).Offset(0, 0).Value = Range("L6").Value End If End Sub -- elrussell ------------------------------------------------------------------------ elrussell's Profile: http://www.excelforum.com/member.php...o&userid=31020 View this thread: http://www.excelforum.com/showthread...hreadid=518125 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing | Excel Discussion (Misc queries) | |||
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell | Excel Worksheet Functions | |||
I copy a formula and the results copy from the original cell | Excel Discussion (Misc queries) | |||
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? | Excel Programming |