Copy Cell From Subtotal Line To Detail Line

T

Tickfarmer

Exported data to excel is in subtotal form by customer number (ARAF09).
I need to copy the customer number to the detail rows just below the
subtotal. The number of detail rows varies with each customer. Some have 1
line of detail and some have 10, 8, etc. . The customer number is in column
B and I want to copy the data to Column C, a few rows down. Is this possible
with a formula or function. Thanks in advance.

The orverall goal is to be able to sort the detail data by customer number.
Perhaps another method is better?

Customer: ARAF09 ABC FLOORS INC
Terms: Net 30 Days

6/29/2009 484756 Copy Here 4642.75
8/24/2009 494581 859.50
10/15/2009 503963 2267.37
10/26/2009 505528 146.95
10/28/2009 505847 599.20
 
D

Dave Peterson

I'm guessing that "Customer:" is in column A and "ARAF09" is in column B.

If that's true, then insert a new column A (to slide the data to the right).

Then in A1, put:
=C1

In A2, put:
=if(b2="Customer:",c2,a1)

And drag down.

Then select column A and convert it to values (edit|Copy, edit|paste
special|values).

If the data is in one cell ("customer: ARAF09"), you could use the same
technique:

Still insert a new column A

In A1:
=trim(mid(b1,10,255)) This will strip the "Customer:" stuff out.

Then in A2:
=if(left(b2,9)="Customer:",trim(mid(b2,10,255)),a1)

and drag down and convert to values.
 
P

Pete_UK

I assume that you have (and want to end up with) something like this:

Customer: ARAF09 ABC FLOORS INC
Terms: Net 30 days    

06/29/2009 484756 ARAF09 4642.75
08/24/2009 494581 ARAF09 859.50
10/15/2009 503963 ARAF09 2267.37
10/26/2009 505528 ARAF09 146.95
10/28/2009 505847 ARAF09 599.20

Customer: ARAF10 A.N. Other INC
Terms: Net 30 days

06/29/2009 484756 ARAF10 4642.75
08/24/2009 494581 ARAF10 859.50
10/15/2009 503963 ARAF10 2267.37

i.e. you have a new heading for each customer and blank rows around
each heading, and that you have inserted a new column C. Put this
formula in C4:

=IF(C3="",IF(A1="Customer:",B1,""),IF(B4="","",C3))

and then copy it down as far as you need to give you the customer
numbers as shown above.

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top