Substitute an array of values with a single value

gavcol

New Member
Joined
Dec 22, 2016
Messages
19
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi,

Thanks in advance for helping.

I have a formula that I want to streamline a bit (too many nested substitutes)

Is there a way to substitute multiple values for a single value but without nesting a heap of Substitute functions ?
maybe something along the lines of the following :
=SUBSTITUTE(VLOOKUP($D2,DataRange,4,FALSE),{"W","T","O","P","R",D","S"},"Productive")

I use something similar in a sumifs formula and it works very well but not with substitute unfortunately

Cheers,
Gav
 
If you did not want to create the extra table, I think this formula might work directly...

=IF(ISNUMBER(FIND(VLOOKUP($D2,DataRange,4,FALSE),"WTOPRDS")),"Productive","Unproductive")


Oh, I see. Thats clever.
You're right, I am hesitant to use the extra table and prefer to keep as much in the one formula as possible.
Although, that formula only has the 2 results for Productive & unproductive but doesn't accommodate the "L" Leave result.
 
Upvote 0

Forum statistics

Threads
1,226,795
Messages
6,193,047
Members
453,772
Latest member
aastupin

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