Return Value in Range of Cells

laurayas

New Member
Joined
Oct 31, 2014
Messages
4
Hello,

I am creating a fairly complex spreadsheet which is formulated all over however I am stuck when it comes to a specific formula can someone help?

I have a range of cells that will populate with Text depending on the information processed previously in the sheet, only one cell within a row will be populated at one time. The cells to populate are O5:W5 and depending on the text within a cell within this range I need the text to return into cell X5. There are only 3 different text strings that will populate within the cells and then X5 is conditionally formatted to colour depending on its contents... example below:

[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]Own car
[/TD]
[TD]Own car Paid
[/TD]
[TD]Own car Outstanding
[/TD]
[TD]Other - not to pay
[/TD]
[TD]Other Paid
[/TD]
[TD]Other Outstanding
[/TD]
[TD]Unknown not to pay
[/TD]
[TD]Unknown Paid
[/TD]
[TD]Unknown Outstanding
[/TD]
[TD]Permit Obtained
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]PAID[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]PAID[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]NO ACTION REQUIRED[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]NO ACTION REQUIRED[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]OUTSTANDING[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]OUTSTANDING[/TD]
[/TR]
</tbody>[/TABLE]


At the moment I can get the sheet to return the value into O5 if its populated and nothing if its empty with "=IFERROR(INDEX(O15:W15,MATCH("*",O15:W15,0)),"")" however as I said it will only return the value in O5 and nothing else within the range.

could someone advise a formula that will help me with this problem?

thanks
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
LOOKUP is enough

=IFERROR(LOOKUP("ZZZZZZ",O15:W15),"")

or
You have to change your formula by replacing "*" to "?*"

=IFERROR(INDEX(O15:W15,MATCH("?*",O15:W15,0)),"")
 
Upvote 0
Hi billszysz,

I Have tried both, the 1st suggestion won't work as there is not one specific text string that im looking for, there are 3 possibilities it could be. Suggestion 2 is returning the value of cell 015 if it is populated however if the text string is in Q15 for example then its returned nothing.

thanks
 
Upvote 0
Hi, I think pgc01's answer was right except that the cell references were out. It worked for me with this formula placed in Cell X2: =IFERROR(LOOKUP(2,1/(O2:W2<>""),O2:W2),""). Note the difference range references.

(I tested it by simply copying the sample data starting at cell O1 (which is the heading row).

Hope this helps.

Regards

PS. I don't actually know how the formula works so am now off to investigate!
 
Upvote 0
Hi, I think pgc01's answer was right except that the cell references were out. It worked for me with this formula placed in Cell X2: =IFERROR(LOOKUP(2,1/(O2:W2<>""),O2:W2),""). Note the difference range references.

(I tested it by simply copying the sample data starting at cell O1 (which is the heading row).

Hope this helps.

Regards

PS. I don't actually know how the formula works so am now off to investigate!

Hi All,

thanks for your suggestions, i couldnt get them to work so went about it another way. Rather than returning text into the different sections I returned a value and then depending on the value it returned the text "Paid","Outstanding","No action Required".

Seems to work ok and have put the sheet in play with the business

thank you
 
Upvote 0
Hi Laura, There are always multiple solutions to excel problems so delighted you've got it fixed.

Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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