Grant9196
Grant9196

Reputation: 139

how to put data from multiple columns into one column in excel

I am moving a site from magento to shopify and it's proving a little difficult. For the products I sell, it's necessary to give the customer a number of specifications before they purchase (colour, material, weight, RAM, etc.) In magento it was possible to create a column in the csv for each of these specifications and add the relevant information in the cells and if the cell had data it would add that the the product page and if it didn't, it would omit that data from the product page. Moving the shopify, this isn't a feature and requires me to consolidate all of this information into 1 column before upload. Doing this can of course result in a number of issues - from missing information to incorrect html input (as the information is to be in a table format).

I have provided a sample file here: https://docs.google.com/spreadsheets/d/1rFFqS20ED1S1cPCTixZm5ToyMhEow4VpVwapLj1ps38/edit?usp=sharing

The idea is for the specifications (in this case colour , material, brand and weight) to be presented in a html table format for uploading. The column 'Body HTML' shows the desired output from each of the columns A:D. If there is data in the cell from columns A:D, the corresponding E cell of the same row will show that data along with the header; if there is no data in the cell, the corresponding E cell of the same row will omit that piece of data along with the header.

Upvotes: 0

Views: 494

Answers (1)

RobertBaron
RobertBaron

Reputation: 2854

To put together the pieces that you want in column E, you can use the CONCATENATE function as follows:

=CONCATENATE(s1,s2,s3,...)

Now, s1,s2,s3,... are the strings that you want to concatenate together derived from columns A to D. For each si, you use the IF function. For example, for column A:

IF(A1<>"",CONCATENATE("<td>Colour: ",A1,"</td>"),"")

which evaluates to "Colour: Red" if cell A1 is not empty, and "" otherwise.

Upvotes: 1

Related Questions