You are here:

- Home
- Computing/Technology
- Business Software
- Excel
- 4 Column, 10 Row range --> 1 Row?

Advertisement

QUESTION: Hi, Tom!

Hopefully you can help me; I work in Excel (2011 for Mac) 10 hours a day, and have learned SO much, but if I can learn this ONE trick, I can probably stop working 2 hours Overtime each day!!

I can give you way more detail than you need probably, if you would like to hear it, otherwise, I'll get to the question...

I would like to take a 10 item list- consisting of 10 rows, but 4 columns (Material Number, Description, Relationship, and a blank cell) and with minimal effort, get that 10R4C list into 1 horizontal row... here is a 3 item example (I chose a period to indicate the blank cell.)

I'd create a data range looking like this (minus the period and vertical line)

9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.

9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.

9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.

I want to find a way to make it look like THIS

9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.

Obviously, space prevents the ability to show you the data range is now on one line.. I used a three row example, but sometimes it could be as many as 60 rows (4 columns is constant).

Can this be done relatively easily? Taking a 36R,4C list and using freeze panes and copy and paste takes about 15 minutes per row, and I have over 100 in this particular spreadsheet, so this skill is KEY!Thank you!!

ANSWER: Chris,

I put your data in A2:D4

in E2 I put this formula: =A2&"|"&B2&"|"&C2&"|"&D2

this literally produce:

9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.

in E2 I put this formula: =E2&A3&"|"&B3&"|"&C3&"|"&D3

I did it by drag filling down the formula in E2 and then editing it to have E2& at the front

this literally produced:

9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.

I selected E3 and drag filled down

in E4 the formula became: =E3&A4&"|"&B4&"|"&C4&"|"&D4

and it produced

"9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|."

If I had more rows of data I could continue to drag fill it down. I did reproduce the above 3 rows until it produced 42 rows of data and then drag filled the formula down (took a second or more). This produced

----------------------------

9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780618767670|HMM MO LESSON PLANNR DOWNLD LK-6 07|Derivative|.9780547056081|HMM MS LESSON PLNR DOWNLOADS, LV K-6|SE/TE Common Spec|.9780618767700|HMM NJ LESSON PLANNR DOWNLD LK-6 07|Derivative|.

-------------------------------------

Now you may see an extra space or two, but that was/is because the data I put in the cells may have had an extra space or something. You said the period represents a blank cell. If the cell was actually blank, then it wouldn't even appear in the result. If it contained a single space character, then the period would be replaced by a space. My data did not contain vertical lines - but you showed a result that inserted vertical lines. I did likewise in my formula, but those could be removed if you didn't want them.

At the end I selected the last cell E43 and did a copy and then paste values. I could then delete all the other data in column E and I had my results.

Hope this helps.

--

Regards,

Tom Ogilvy

---------- FOLLOW-UP ----------

QUESTION: Tom, Thank you for the prompt reply!! Unfortunately, I was unable to recreate your results with your formula;

I was attempting to attach a sample sheet I created for you which includes the current list I am trying to turn into a 1-Row list; The second page shows only the format that I have to follow when pasting data into it, which will illustrate why my horizontal list needs to have 4 cells per item.

Thank you again for your efforts. It really is difficult to explain clearly and succinctly what I am trying to achieve, so for THAT alone, thank you!!

Chris,

You can send the workbook to twogilvy@msn.com

I don't have a Macintosh or other apple product, so I will have to be able to read it in Windows Excel. I don't think that will be a problem if it is just a file with data and or formulas in it.

--

Regards,

Tom Ogilvy

This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

Answers by Expert:

Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]

Extensive experience. **Education/Credentials**

Master of Science (MS) degree Operations Research (ORSA)**Awards and Honors**

Microsoft MVP in Excel.