LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Possible Macro Solution To My Problem

If, as you say, all is in the SAME column, then this will work but leaves
some short rows at the end to delete.

Sub lineupdata()
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row
If InStr(Cells(i, 1), " ") = 15 Then
mv = Cells(i, 1)
Rows(i).Delete
End If
If InStr(Cells(i, 1), " ") < 15 Then
Cells(i, 1).Value = mv & Cells(i, 1)
End If
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Robert" wrote in message
...
There are times when I have to dump financial information from the AS400
to
Excel. When I do, it comes down in the following format:

ACCOUNT/JOB # DESCRIPTION
7618-000-00000 COMMISSIONS
VL02527 MATHEWS GINA
VL02527 MATHEWS GINA
VL02537 MICHAELS MARG
VL02537 MICHAELS MARG
8111-000-00000 DEPRECIATION
APRIL 07 DEPR ENTRY
AUG 07 DEPR ENTRY
DEC 07 DEPR ENTRY
FEB 07 DEPR ENTRY

I need an easy way to move the account # and account name to the first two
columns like this:

7618-000-00000 COMMISSIONS VL02527 MATHEWS GINA
7618-000-00000 COMMISSIONS VL02527 MATHEWS GINA
7618-000-00000 COMMISSIONS VL02537 MICHAELS MARG
7618-000-00000 COMMISSIONS VL02537 MICHAELS MARG
8111-000-00000 DEPRECIATION APRIL 07 DEPR ENTRY
8111-000-00000 DEPRECIATION AUGUST 07 DEPR ENTRY
8111-000-00000 DEPRECIATION DECE 07 DEPR ENTRY
8111-000-00000 DEPRECIATION FEBR 07 DEPR ENTRY

I can do it manually, but there are 5,000+ lines and it takes a lot of
time.
Is there any way to automate this?

Thanks.

Robert




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OLD PROBLEM without SOLUTION ytayta555 Excel Worksheet Functions 19 July 10th 08 07:17 PM
OLD PROBLEM without SOLUTION , part || ytayta555 Excel Worksheet Functions 1 July 8th 08 03:57 PM
Need A Solution To A Problem Dave Excel Discussion (Misc queries) 4 October 3rd 07 04:53 PM
sum if problem, trying to find best solution shalombi Excel Discussion (Misc queries) 5 May 31st 06 12:57 PM
Macro Solution for Link Problem? Mikeice Excel Worksheet Functions 2 June 14th 05 07:49 AM


All times are GMT +1. The time now is 11:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"