VLOOKUP a custum function based on category

chandlerlandrum

New Member
Joined
Nov 11, 2019
Messages
1
Hello all,

I'm trying to figure out how to VLOOPUP a custum number rounding function based on the type of pollutant.

For example...(these emission rates are made up for the purpose of the example)

Avg (lb/hr) Max (lb/hr) Annual (tpy)
Pollutant A 0.11115 0.11115 0.11115
Pollutant B 0.11115 0.11115 0.11115


Pollutant A lb/hr must be rounded as custom number format: [<0.0005]"<0.001";[<0.005]0.000;#,##0.00
Pollutant A tpy must be rounded as custom number format: [<0.005]"<0.01";#,##0.00
Pollutant B lb/hr and tpy must be rounded as [<0.0005]"<0.001";#,##0.000

So I have created a table just like the one above, but it is blank and has only the proper custom number formats in each cell. Is there a way I can use the IF function and VLOOKUP to lookup a custom number rounding function from my "blank" table and apply it to the table above.

The idea is that the user can input any value for Pollutant A or B and it will automatically use the proper rounding rules based on the pollutant. I need to use VLOOKUP because this is going to be used for over 30 different pollutants with different rounding rules.
 

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.
Re: VLOOUP a custum function based on category

Dont är it being possible without a custom vba function. Conditional formatting might work in a sense but that only alters what is visible but the values are still left intact.

A simple vba function would be My advise.
 
Upvote 0

Forum statistics

Threads
1,213,560
Messages
6,114,304
Members
448,564
Latest member
ED38

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