View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default SAP to Excel. Removing blank cells HELP!!!!

Try the below to delete all blank rows. If you are new to macros Set the
Security level to low/medium in (Tools|Macro|Security). From workbook launch
VBE using short-key Alt+F11. From menu 'Insert' a module and paste the below
code. Save. Get back to Workbook. Run macro from Tools|Macro|Run <selected
macro()

Sub DeleteBlankRows()
For lngRow = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
If WorksheetFunction.CountBlank(Rows(lngRow)) = Columns.Count _
Then Rows(lngRow).Delete
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"DestinySky" wrote:

I down load from SAP to Excel quite often. There is one facet I use and I
ALWAYS have a ton of blank cells. I need to remove them but keep a structure
to the data. Here is a rough idea of what I am working with...... Mind you
this there is this type of info througout the spreadsheet. So if I delete
cells and it asks to shift up or left.. it brings all the data together. ANY
IDEAS?????

10000XXXX Joe Schmoe

10000XXXY Joe Schmoe

1234567 The Store

1234568 The Store

1234569 The Store

1234510 The Store

1234511 The Store

1234513 The Store

1234514 The Store

1234515 The Store

1234516 The Store

1234517 The Store

1234518 The Store