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
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
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,223,430
Messages
6,172,062
Members
452,444
Latest member
ShaImran193

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