View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mark Mark is offline
external usenet poster
 
Posts: 989
Default Sorting Random Data

The format looks like this

A B C D
E F
Invoice #: 12345 Invoice Date: 1/16/1950 A/P Code: ABC
Due Date: 1/16/1950 Total Payable: $20.00 Reference: Freight:
Account #: 1234 Description: Name Reference Amount: 10.00
Account #: 4321 Description: Name Reference 2 Amount: 10.00

The detail table I would like to be able to produce is Invoice, Invoice
data, AP Code, Due Date, Account #, Description, Amount. The biggest problem
I am running into is being able to match the Account # on A3 to the
information on A1:F2. Another problem that could arise is there could
possible be up to 12 different account numbers. Do you have any coding
examples for this? I am not the greatest at writing VBA.

"Joel" wrote:

The right way to do this task is to have a unique column for each field. A
macro can be writen that looks at each line and automatically moves the data
to a unique column in a new worksheet. It is hard to tell from the posting
exactly how to write the code because I can't tell which data is in which
columns.

the new worksheet would look something like this on row 1 (the commas
showing a different column). Will create the header row with the columns and
put the data in the corrrect column.

Invoice #, Invoice Date, A/P Code, Due Date, Total Payable,
Reference Freight, Account #, Description, Name Reference, Name
Referrence 2,

"Mark" wrote:

Is there any formula that I could use to be able to sort the below
information into a format that I could create a pivot table on?

Invoice #: 12345 Invoice Date: 1/16/1950 A/P Code: ABC
Due Date: 1/16/1950 Total Payable: $100.00 Reference: Freight:
Account #: 1234 Description: Name Reference Amount: $100.00
Account #: 4321 Description: Name Reference 2 Amount: $100.00

Any help would be greatly appreciated