Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
KNS
 
Posts: n/a
Default Combining Text from multiple cells under multiple conditions

I've already gotten a partial answer to my question, but my boss is pushing
me to try and find a solution faster, Basically, I have a spreadsheet full of
orders, with a separate line in excel for every item regardless of whether
the items are on the same order or not. I need to combine the items so that
they print in a single cell each item in the order, and that item the number
of times it appears, so something along the lines of
=IF(N30,REPT(J3,N3),IF(A3=A4,J4,"")) Where N3 is the quantity of a single
item, J3 is the item SKU, and column A is the order numbers, which when the
same means a multi-SKU order. Is this possible? If it is, is there a way to
have it compare orders numbers until it comes to one that is different,
because theoretically we could have 20 SKUs on a single order. IF this isn't
clear please ask for clarification of the point that is confusin.



  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

KNS,

In cell O3, use the formula

=IF(A2=A3,IF(O2<"",O2&", ","") &IF(N31,REPT(J3&",
",N3-1)&J3,J3),IF(N31,REPT(J3&", ",N3-1)&J3,IF(N3<"",J3,"")))

In cell P3, use the formula

=IF(A3=A4,"",O3)

Select O3:P3, and copy down to match your data table. The non-blank cells in
column O will contain the strings for each order.

If that doesn't do what you want, post a small table of your data, and what
result you would like.

HTH,
Bernie
MS Excel MVP


"KNS" wrote in message
...
I've already gotten a partial answer to my question, but my boss is

pushing
me to try and find a solution faster, Basically, I have a spreadsheet full

of
orders, with a separate line in excel for every item regardless of whether
the items are on the same order or not. I need to combine the items so

that
they print in a single cell each item in the order, and that item the

number
of times it appears, so something along the lines of
=IF(N30,REPT(J3,N3),IF(A3=A4,J4,"")) Where N3 is the quantity of a single
item, J3 is the item SKU, and column A is the order numbers, which when

the
same means a multi-SKU order. Is this possible? If it is, is there a way

to
have it compare orders numbers until it comes to one that is different,
because theoretically we could have 20 SKUs on a single order. IF this

isn't
clear please ask for clarification of the point that is confusin.





  #3   Report Post  
KNS
 
Posts: n/a
Default


I couldn't ever get that to work, I did manage to make this formula do what
I need, but we do have occasional orders which exceed the amount this formula
is able to handle. The other thing that would be great, is if there's a way
to shorten the formula so that I can put spaces between the items, because as
of now, it exceeds the formula size that excel will allow me.

=IF(A1=A2,X2,IF(A2=A7,CONCATENATE(REPT(J7,N7),REPT (J6,N6),REPT(J5,N5),REPT(J4,N4),REPT(J3,N3),REPT(J 2,N2)),IF(A2=A6,CONCATENATE(REPT(J6,N6),REPT(J5,N5 ),REPT(J4,N4),REPT(J3,N3),REPT(J2,N2)),IF(A2=A5,CO NCATENATE(REPT(J5,N5),REPT(J4,N4),REPT(J3,N3),REPT (J2,N2)),IF(A2=A4,CONCATENATE(REPT(J4,N4),REPT(J3, N3),REPT(J2,N2)),IF(A2=A3,CONCATENATE(REPT(J2,N2), REPT(J3,N3)),REPT(J2,N2)))))))

I can't get a table to copy into this window, but our data fits as follows
A=Order #, B=First Name, C=Last Name, D=Address, E=Address 2, F=Address City,
G=Address State, H=Address Zip, I=Ship to Method, J=Product ID, K=Sold For,
L=Our Cost, M=Quantity, n=Description, O=Carrier Requested, P=Shipping Cost

Thanks for your help.
Zach
KNS

"Bernie Deitrick" wrote:

KNS,

In cell O3, use the formula

=IF(A2=A3,IF(O2<"",O2&", ","") &IF(N31,REPT(J3&",
",N3-1)&J3,J3),IF(N31,REPT(J3&", ",N3-1)&J3,IF(N3<"",J3,"")))

In cell P3, use the formula

=IF(A3=A4,"",O3)

Select O3:P3, and copy down to match your data table. The non-blank cells in
column O will contain the strings for each order.

If that doesn't do what you want, post a small table of your data, and what
result you would like.

HTH,
Bernie
MS Excel MVP


"KNS" wrote in message
...
I've already gotten a partial answer to my question, but my boss is

pushing
me to try and find a solution faster, Basically, I have a spreadsheet full

of
orders, with a separate line in excel for every item regardless of whether
the items are on the same order or not. I need to combine the items so

that
they print in a single cell each item in the order, and that item the

number
of times it appears, so something along the lines of
=IF(N30,REPT(J3,N3),IF(A3=A4,J4,"")) Where N3 is the quantity of a single
item, J3 is the item SKU, and column A is the order numbers, which when

the
same means a multi-SKU order. Is this possible? If it is, is there a way

to
have it compare orders numbers until it comes to one that is different,
because theoretically we could have 20 SKUs on a single order. IF this

isn't
clear please ask for clarification of the point that is confusin.






Reply
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
copying content of cell automatically to multiple cells PAUL GRAZIDE Excel Worksheet Functions 1 June 4th 05 06:52 PM
Help importing text files into individual cells saybut Excel Discussion (Misc queries) 4 May 31st 05 03:24 PM
Adding two text cells together Audrey Excel Discussion (Misc queries) 4 February 24th 05 09:57 PM
Format text across cells peterlsutton New Users to Excel 3 February 21st 05 07:54 PM
Combining data (numeric format) in multiple cells into one cell (t GNAC SID Excel Discussion (Misc queries) 2 February 7th 05 04:09 PM


All times are GMT +1. The time now is 03:47 PM.

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

About Us

"It's about Microsoft Excel"