Extracting data from either of two columns

richardthelionheart

Board Regular
Joined
Mar 25, 2016
Messages
95
Office Version
  1. 2016
Platform
  1. Windows
I have data arriving sometimes in column A and sometimes in column B or column C but only in one oF the three at the same time.. So if there's data in rows in column A, column B and column C at that time would be vacant and vice versa. All the data is of the same nature. Here's an example 12 - 24 - 36 So I'm looking for a formula which can look in column A or column B or column C and consolidate/merge all the columns into one ie column D. I really have no idea whether this is even possible. I know that probably 'search" "find" "IF" or similar will play a part. I would really appreciate some help on this.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Is your data all text or all numeric or a mixture ?

Here are a couple of options:
Book3
ABCDE
1Col ACol BCol CResult ConcatenateResult Text Join
2Hello thereHello thereHello there
32nd line2nd line2nd line
4One more lineOne more lineOne more line
5121212
6242424
7363636
Sheet1
Cell Formulas
RangeFormula
D2:D7D2=IFERROR(VALUE(A2&B2&C2),A2&B2&C2)
E2:E7E2=IFERROR(VALUE(TEXTJOIN("",TRUE,A2:C2)),TEXTJOIN("",TRUE,A2:C2))
 
Upvote 0
Is your data all text or all numeric or a mixture ?

All the entries follow the same format eg 33 - 22 - 55
Thank you Alex for your reply.
So I would embrace your 2nd option ??
 
Upvote 0
I can't tell whether you have that in one cell or not. If it is in 1 cell it must be text, in that case the formulas are much simpler and you only need either
Excel Formula:
=A2&B2&C2
Or
Excel Formula:
=TEXTJOIN("",TRUE,A2:C2)
 
Upvote 0
Thank you once again, Alex

each entry in one cell only, not 3 as it might look, is like this..........

44 - 22 - 66

So, I'm guessing that although it looks like number it would in fact be treated as text ??
 
Upvote 0
Both my original formulas in Post #2 are more flexible and would handle it, if your data is consistently in that format you don't need the additional complexity and either of the 2 formulas in post #4 should do the job for you. Have you tried them ?
 
Upvote 0
Thank you, Alex. I will have a 'dummy run' over the next short period, say 20 mins or so, and let you know.
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

although it looks like number it would in fact be treated as text
If they are text then, depending on your version, it seems one of these should do it?

Excel Formula:
=CONCAT(A2:C2)
Excel Formula:
=A2&B2&C2
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top