• 470K Members
• 4,372 Online
• 568K Conversations
SOLVED

New Contributor

# Excel formula Help

Hi,

I am trying to create a formula which looks at a value in a cell then depending on the value returns a set price. for example if cell a1 is between 0 and 0.03 it should return the value of £1. if cell a1 is between 0.03 and 0.05 it should return the value of £2. If cell a1 is between 0.05 and 0.08 it should return the value of £3 etc.

many thanks in advance for any help

3 Replies
Solution

# Re: Excel formula Help

Hi,

If ignore your "etc." the function could be like

You may hardcode your ranges within the formula, but that's not a good idea.

Same is in attached file.

# Re: Excel formula Help

hi sergei,

that works great, thanks a lot
Highlighted

# Re: Excel formula Help

Hi @halkett  - You have to use a Vlookup formula with an approximate match and include your ranges in a lookup table.

For instance:

0 - .03 = Scenario 1

.03 - .05 = Scenario 2

.05 - .08 = Scenario 3

.08 and above = Scenario 4

Attached is a spreadsheet of how it works. Your variable (that you change to test the formula) is in A1. The Vlookup formula itself is in B1. Please let me know if this works for you.

Regards,

William

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies