View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dom_Ciccone Dom_Ciccone is offline
external usenet poster
 
Posts: 52
Default check a row ignore blank cells print only those with text

If you don't wish to use filters and copy/pastes the simplest method is to
use a macro to do this:

Sub movedata()
numrows = ActiveSheet.Range("A65536").End(xlUp).Row
ActiveSheet.Range("B1").Select
For myloop = 1 To numrows
If Cells(myloop, 1).Value < "" Then
ActiveCell.Value = Cells(myloop, 1).Value
ActiveCell.Offset(1, 0).Select
End If
Next myloop
End Sub
--
Kevin Ciccone


"Rollo Tomasi" wrote:

I want to check down a column of cells, some of which may be blank, I want to
gnore the blank ones and print only the contents (in another cell) those with
a number in them.

eg
A B
1 1234
2 1234
3

in the example above I want to ignore A1 & A3 but print the result of A2 to
B1