Combining rows

Closed
Matt406 - Jun 1, 2015 at 03:04 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jun 2, 2015 at 11:23 AM
Hello,

My situation is similar to a question that was asked but not exactly the same. This is how my spreadsheet looks now:

A 1 1 0 0 1 1
A 0 1 1 0 1 1
B 1 0 0 0 0 1
B 0 0 0 0 1 1

I would like to combine those into two rows like this:

A 1 1 1 0 1 1
B 1 0 0 0 1 1

If you know a way could you please explain the steps. Not just "use this formula". I'm newer to Excel so need a little more step-by-step. Thank you!

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Jun 2, 2015 at 11:23 AM
Hi Matt,

Well, you could use a combination of IF and OR functions to check if the result needs to be a 1 or 0. Like:
=IF(OR(B1=1,B2=1),1,0)
So if either B1 or B2 is 1 then result will be 1, otherwise 0.

But depending on your amount of data it will be more beneficial to use a code.

So how much data are we talking about?
And also, is your data always grouped on 2 lines?

Do feel free to ask anything you like. I'm always happy to assist anyone wanting to learn more about Excel.

Best regards,
Trowa
0