If [range of cells] contains 'text1' or 'text2', or, ... , return that text here.

TwinkleW

New Member
Joined
Mar 17, 2022
Messages
13
Office Version
  1. 2016
Platform
  1. Windows
Hello, I'm sure this is painfully simple, but not until you know how!
Into each cell A_i in column A, I want to return whatever text is in the range of cells B_i:D_i.
For example: for row 2, I want Excel to check if there is any text in cells B2, C2 or D2 and if so, return that text into A2, otherwise, leave A2 blank (there will be text in only one cell, if any).

I may want to extend the search rage to more than three cells in the row.
(I know it seems a bit pointless but this is not the actual text.)
Thank you.

Book1
ABCD
1X,Y, or Z?XYZ
2Y
3X
4Z
5Y
6X
7Y
8X
9Z
Sheet1
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi,
is this what you want ??

Book6
ABCD
1X,Y, or Z?XYZ
2YY
3XX
4ZZ
5YY
6XX
7YY
8XX
9ZZ
Sheet1
Cell Formulas
RangeFormula
A2:A9A2=CONCATENATE(B2,C2,D2)
 
Upvote 0
you are welcome & thanks for the feedback
Hello again and sorry to bother you but would you happen to know how I would then sum the amounts in column A, but only for the Y's in column B?
So just adding 45 + 56 + 54 (for example)
Thank you

Book1
ABCDE
1AmountX,Y, or Z?XYZ
245YY
321XX
432ZZ
556YY
678XX
754YY
898XX
942ZZ
Sheet1
Cell Formulas
RangeFormula
B2:B9B2=CONCATENATE(C2,D2,E2)
 
Upvote 0
I am not sure where you want the formula result
I have inserted the formula just below the amount list in cell A10

Or is there anything, I have misunderstood ???

Book6
ABCDE
1AmountX,Y, or Z?XYZ
245YY
321XX
432ZZ
556YY
678XX
754YY
898XX
942ZZ
10155
Sheet1
Cell Formulas
RangeFormula
B2:B9B2=CONCATENATE(C2,D2,E2)
A10A10=SUMIF(B2:B9,"Y",A2:A9)
 
Upvote 0
Solution
I am not sure where you want the formula result
I have inserted the formula just below the amount list in cell A10

Or is there anything, I have misunderstood ???

Book6
ABCDE
1AmountX,Y, or Z?XYZ
245YY
321XX
432ZZ
556YY
678XX
754YY
898XX
942ZZ
10155
Sheet1
Cell Formulas
RangeFormula
B2:B9B2=CONCATENATE(C2,D2,E2)
A10A10=SUMIF(B2:B9,"Y",A2:A9)
Brilliant again :) Thanks so much. You're a star :)
 
Upvote 0

Forum statistics

Threads
1,216,368
Messages
6,130,201
Members
449,566
Latest member
MikeWnbExclWiz

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