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

Or, if you want a Visual Basic solution (much faster once you have it!) -
here is a routine that Nigel posted a while ago in the Programming group. I
you're not familiar with Visual Basic in Excel, I can add instructions on
installing and using the routine.

'
' Remove all blank rows from data on a worksheet
'
Sub RemoveEmptyRows()

Dim xr As Long, xc As Integer, dRow As Boolean
Dim CalcType As Long

With Application
.ScreenUpdating = False
CalcType = .Calculation
.Calculation = xlCalculationManual
End With

For xr = Val(StrReverse(ActiveSheet.UsedRange.Address)) To 1 Step -1
dRow = True
For xc = 1 To 255
If Len(Trim(Cells(xr, xc))) 0 Then
dRow = False
Exit For
End If
Next xc
If dRow Then Rows(xr).Delete shift:=xlUp
Next xr

With Application
.ScreenUpdating = True
.Calculation = CalcType
End With
End Sub

--
-------------------
If toast always lands butter-side down, and cats always land on their feet,
what happen if you strap toast on the back of a cat and drop it?
Steven Wright (1955 - )


"Gary Brown" wrote:

Oh, OK,
Forget about the concatenate functions in my other post.
Just use the =Row( ) formula in Column A.
I thought you wanted the blank column cells as well as blank rows deleted.
--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"DestinySky" wrote:

it imports as a .txt file and it should look like this:

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




"EricG" wrote:

Questions:

How do you bring the data into Excel? Do you copy/paste, or read in from a
.txt or .csv file?

What should the data look like when you're done?

Eric

---------------------
If toast always lands butter-side down, and cats always land on their feet,
what happen if you strap toast on the back of a cat and drop it?
Steven Wright (1955 - )


"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