Macro to select non empty rows in a given range

  • Thread starter Thread starter Mario
  • Start date Start date
M

Mario

A| B| C| D|
-----------------------------------
1|1,1 | 1,3 | |
-----------------------------------
2| | | |
-----------------------------------
3|3,1 | 3,3 | |
-----------------------------------
4| | | |

Is there a way to create a Macro that can select rows 1
and 3 (col B tru D). In other words a macro to select the
non empty rows in the range B1:D4.

Thanks
Mario.
 
Mario said:
A| B| C| D|
-----------------------------------
1|1,1 | 1,3 | |
-----------------------------------
2| | | |
-----------------------------------
3|3,1 | 3,3 | |
-----------------------------------
4| | | |

Is there a way to create a Macro that can select rows 1
and 3 (col B tru D). In other words a macro to select the
non empty rows in the range B1:D4.

Sub Macro1()
'
' Macro1 Macro
' Macro grabada el 23-01-2004 por Beto
'

'
Selection.SpecialCells(xlCellTypeBlanks).Select
End Sub

As you may see this code was obtained using the Macro Recorder. How?
Start saving, select the range, press F5 then click on Specials and
finally choose Blank Cells. Click Ok and stop recording. go to the VBE
and you'll see the same code.

Regards,
 
Back
Top