Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to combine 2 columns?

For example, I have a survey asking a Yes/No question. But the survey puts all yes’ in one column, and no’s in another. So it will look like

column 1    column 2
yes 
yes 
             no
yes 
             no
             no
yes 

And I want it to look like

column 1
yes 
yes 
no
yes 
no
no
yes 

Merging will delete one of the columns...and that's about all I know. Hopefully it won't involve VBA since I don't know any of that.

share|improve this question

migrated from stackoverflow.com Dec 5 '12 at 20:45

This question came from our site for professional and enthusiast programmers.

1  
Can't you just have a third column and concaternate columns 1+2 into it? –  Sam Ward Dec 5 '12 at 18:05
1  
@SamWard looks like that will work...can't you just put that as an answer so I can give you credit? –  SnowboardBruin Dec 5 '12 at 18:30
add comment

2 Answers 2

Sorry, repeat of previous answer. Concatenate the columns in a third column using the "&" operator. For example, if the "yes" column starts in cell A2 and the "no" column starts in cell B2, enter the formula =A2&B2 in cell C2 and then copy the formula down in column C to the end of your data. If you want the new column to be values then copy it and then special paste it in place as values.

share|improve this answer
add comment

Alternative to entering a formula in a third column, you can also

  • Select column 1
  • Goto (Ctrl-G) -> Special (Alt+S) -> Blank Cells (Alt+K, Enter)
  • Delete cells (Ctrl--), Shift left (Alt-L)

This way, all blank cells in column a will be selected

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.