return non blank values in a row with additional logic

Dervos

New Member
Joined
Oct 23, 2018
Messages
17
Hello Everyone,

Seeking for assistance to help solve scenario below...

I am looking for a formula which would return a non-blank value in a row and cover some additional logic:

1) if the row has one value (i.e. ROW 2 / B2) return that value
2) if the row has two or more values (i.e. ROW3 / C3&D3) return specific text
3) if the row has no values (i.e. ROW4) return specific text (2)

*Please note that the actual cells are filled with formulas returning string values in a General format.



Appreciate your help!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Welcome to the MrExcel board!

See if this, copied down, does what you want.

Excel Workbook
ABCDE
1
2X1yellowyellow
3X2redyellowError
4X3No results
Check



BTW, for the future, look at the link in my signature block below for ways to post sample data that we can actually copy/paste from to test.
 
Upvote 0
Peter,

Thanks for the tip!

Unfortunately, the suggested formula is returning "error" value across all the rows... I think this may be due to the cell format which I'll try to explain.

I am using below formulas to get the outputs (yellow/red/...) in Columns B/C/D:

ABCDE
1
color1color2color3
2
text : yellow x=IF((SUMPRODUCT(--ISNUMBER(SEARCH(Table73[[#All],[yellow]], A2)))>0)=TRUE,Table73[[#Headers],[yellow]], "")=IF((SUMPRODUCT(--ISNUMBER(SEARCH(Table74[[#All],[red]], A2)))>0)=TRUE,Table74[[#Headers],[red]], "")=IF((SUMPRODUCT(--ISNUMBER(SEARCH(Table76[[#All],[blue]], A2)))>0)=TRUE,Table76[[#Headers],[blue]], "")
3
text : red yellow=IF((SUMPRODUCT(--ISNUMBER(SEARCH(Table73[[#All],[yellow]], A3)))>0)=TRUE,Table73[[#Headers],[yellow]], "")=IF((SUMPRODUCT(--ISNUMBER(SEARCH(Table74[[#All],[red]], A3)))>0)=TRUE,Table74[[#Headers],[red]], "")=IF((SUMPRODUCT(--ISNUMBER(SEARCH(Table76[[#All],[blue]], A3)))>0)=TRUE,Table76[[#Headers],[blue]], "")
4
text : empty=IF((SUMPRODUCT(--ISNUMBER(SEARCH(Table73[[#All],[yellow]], A4)))>0)=TRUE,Table73[[#Headers],[yellow]], "")=IF((SUMPRODUCT(--ISNUMBER(SEARCH(Table74[[#All],[red]], A4)))>0)=TRUE,Table74[[#Headers],[red]], "")=IF((SUMPRODUCT(--ISNUMBER(SEARCH(Table76[[#All],[blue]], A4)))>0)=TRUE,Table76[[#Headers],[blue]], "")

<tbody>
</tbody>

Actual Outputs after calculations (Columns B/C/D):

ABCDE
1
color1color2color3Expected Output
2
text : yellow xyellowyellow
3
text : red yellowyellowredError
4
text : emptyNo result

<tbody>
</tbody>

Now using the output (Columns B/C/D) from the table above, how do I get Column E values:

1) if the row has one value (i.e. ROW 2 / B2) return that value
2) if the row has two or more values (i.e. ROW3 / C3&D3) return specific text
3) if the row has no values (i.e. ROW4) return specific text (2)

Appreciate your help!
 
Upvote 0
I am using ... formulas to get the outputs (yellow/red/...) in Columns B/C/D
OK, that does make a difference.

So now the question is what version of Excel are you using? Do you have the CONCAT function?

E2: =IF(COUNTIF(B2:D2,"?*")=0,"No results",IF(COUNTIF(B2:D2,"?*")=1,CONCAT(B2:D2),"Error"))
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

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