View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Copy Cell From Subtotal Line To Detail Line

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.

Tickfarmer wrote:

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

--
Tickfarmer


--

Dave Peterson