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:

Own car
Own car Paid
Own car Outstanding
Other - not to pay
Other Paid
Other Outstanding
Unknown not to pay
Unknown Paid
Unknown Outstanding
Permit Obtained
PAIDPAID
NO ACTION REQUIREDNO ACTION REQUIRED
OUTSTANDINGOUTSTANDING

<tbody>
</tbody>


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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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,215,788
Messages
6,126,907
Members
449,348
Latest member
Rdeane

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