Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How to skip cells with text strings.
What should I add to the code below to cause it to skip a cell that contains a text string in the cell above it? I need it to only work on numbers in the cell above it. If ActiveCell.Offset(rowoffset:=-1) < "" Then ActiveCell = ActiveCell.Offset(rowoffset:=-1) + 1 Application.SendKeys ("{Enter}") End If Thanks so much. mikeburg -- mikeburg ------------------------------------------------------------------------ mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581 View this thread: http://www.excelforum.com/showthread...hreadid=393456 |
#2
|
|||
|
|||
You can check the cell above by:
if isnumeric(activecell.offset(-1,0)) then 'it's numeric. else 'it's not end if mikeburg wrote: What should I add to the code below to cause it to skip a cell that contains a text string in the cell above it? I need it to only work on numbers in the cell above it. If ActiveCell.Offset(rowoffset:=-1) < "" Then ActiveCell = ActiveCell.Offset(rowoffset:=-1) + 1 Application.SendKeys ("{Enter}") End If Thanks so much. mikeburg -- mikeburg ------------------------------------------------------------------------ mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581 View this thread: http://www.excelforum.com/showthread...hreadid=393456 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
text wrap in merged cells | Excel Discussion (Misc queries) | |||
format cells having text | Excel Discussion (Misc queries) | |||
Referencing cells text output if it meets specific conditions | Excel Worksheet Functions | |||
Adding two text cells together | Excel Discussion (Misc queries) | |||
how do i add the same text after current text in multiple cells | Excel Discussion (Misc queries) |