We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
another excel formula required

Percybridge
Posts: 77 Forumite
in Techie Stuff
I want a certain cell to have a value as follows
If the value of B6 is
between the value in B1 and B2, B6 should have a value of £1000
between B2 and B3, B6 should have a value of £2000
over B3, its value should be £3,000
If the value of B6 is
between the value in B1 and B2, B6 should have a value of £1000
between B2 and B3, B6 should have a value of £2000
over B3, its value should be £3,000
0
Comments
-
=IF(AND(B6>=B1,B6<=B2),1000,IF(AND(B6>=B3,B6<=B4),2000,IF(B6>=B5,3000,0)))
The = signs assume they are inclusive ranges.
However, if the ranges follow on from each other, a vlookup would be simpler....
=VLOOKUP(B6,D8:E10,2)
where D8, D9 and D10 contain the starting values of each "between" pair and E8, E9 and E10 contain 1000, 2000 and 3000 respectively.
You will get an N/A error if the value being looked up is below the first entry, but an additional entry starting at 0 should handle that.
Edit:
Forget the first formula as your ranges obviously do follow on. Vlookup is the answer.I’m a Forum Ambassador and I support the Forum Team on the In My Home MoneySaving, Energy and Techie Stuff boards. If you need any help on these boards, do let me know. Please note that Ambassadors are not moderators. Any posts you spot in breach of the Forum Rules should be reported via the report button, or by emailing forumteam@moneysavingexpert.com.
All views are my own and not the official line of MoneySavingExpert.
0 -
Try this.
=IF(AND(B5>=B1,B5<B2)=TRUE,1000,IF(AND(B5>=B2,B5<B3)=TRUE,2000,IF(B5>B3,3000,"Error")))
You didn't specify what you want to happen if B5 = B1, B2 or B3, but you can change the < or > to =< or >= in the formula if you want to alter this.0 -
many thanks for taking the time to reply.0
-
How can B6 have a value to check against AND a formula?0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 351.7K Banking & Borrowing
- 253.4K Reduce Debt & Boost Income
- 454K Spending & Discounts
- 244.7K Work, Benefits & Business
- 600.1K Mortgages, Homes & Bills
- 177.3K Life & Family
- 258.4K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.2K Discuss & Feedback
- 37.6K Read-Only Boards