Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-13-2016, 06:18 AM
paxon paxon is offline if(and.. formula Windows XP if(and.. formula Office 2007
Novice
if(and.. formula
 
Join Date: Feb 2016
Posts: 13
paxon is on a distinguished road
Default if(and.. formula


Hi..
I am trying to solve the if(and.. formula from the attached file in column "H")

This is what I am trying to do:

if"g8" is = to "C21" then give me "D21" And if "g8" is >"B22" but < than "C22" then give me "D22"... and so on till line 29.

I think that the formula If(And.. is probably a good one but I do not know how to make it.

thanks
Attached Files
File Type: xlsx Book1.xlsx (13.8 KB, 12 views)
Reply With Quote
  #2  
Old 05-13-2016, 08:26 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline if(and.. formula Windows 7 64bit if(and.. formula Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,780
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Perhaps =LOOKUP($G8,$C$21:$C$29,$D$21:$D$29)

Drag down as needed
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 05-19-2016, 04:44 AM
paxon paxon is offline if(and.. formula Windows XP if(and.. formula Office 2007
Novice
if(and.. formula
 
Join Date: Feb 2016
Posts: 13
paxon is on a distinguished road
Default

Quote:
Originally Posted by Pecoflyer View Post
Perhaps =LOOKUP($G8,$C$21:$C$29,$D$21:$D$29)

Drag down as needed
Thank,

But I would be more interested in understanding how if(and... works to keep the range that I have between the numbers.
Reply With Quote
  #4  
Old 05-19-2016, 04:48 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline if(and.. formula Windows 7 64bit if(and.. formula Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,780
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Could you be a little more explicit please?
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #5  
Old 05-19-2016, 06:55 AM
candybg candybg is offline if(and.. formula Windows 7 64bit if(and.. formula Office 2010 64bit
Novice
 
Join Date: May 2016
Posts: 9
candybg is on a distinguished road
Default

Paxon - it appears you might be unfamiliar with the LOOKUP function (as opposed to VLOOKUP and HLOOKUP). The formula as written by Pecoflyer using LOOKUP negates the need for complicated, nested IF formulas.

Here is some good info on the LOOKUP formula:
https://support.office.com/en-us/art...1-369d5e3864cb
One statement from that page that applies to your specific instance is:
If the LOOKUP function can't find the lookup_value, the function matches the largest value in lookup_vector that is less than or equal to lookup_value.

Hope this helps!
Reply With Quote
  #6  
Old 05-19-2016, 07:15 AM
paxon paxon is offline if(and.. formula Windows XP if(and.. formula Office 2007
Novice
if(and.. formula
 
Join Date: Feb 2016
Posts: 13
paxon is on a distinguished road
Default

Quote:
Originally Posted by Pecoflyer View Post
Could you be a little more explicit please?
Sure,

I will attached the excel file. Column "I" is exactly the formula I was looking for. But if you look "I12" the formula should give me the value of 3 because the range 61-80 (as per D25) and not FALSE.

I do not understand why is not working.
Attached Files
File Type: xlsx Book1.xlsx (14.2 KB, 12 views)
Reply With Quote
  #7  
Old 05-19-2016, 07:56 AM
candybg candybg is offline if(and.. formula Windows 7 64bit if(and.. formula Office 2010 64bit
Novice
 
Join Date: May 2016
Posts: 9
candybg is on a distinguished road
Default

Oops - the formula as written by Pecoflyer should be:
=LOOKUP($G8,$B$21:$B$29,$D$21:$D$29)
(looking at Col B, rather than Col C)
If you paste that formula in I8, and drag down, you will get the results you expect.
Reply With Quote
  #8  
Old 05-19-2016, 08:02 AM
xor xor is offline if(and.. formula Windows 10 if(and.. formula Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Pecoflyer gave you by far the best formula (one function call), but if you absolutely want to use a complicated IF(AND-construction with a lot more function calls then:
Attached Files
File Type: xlsx paxon_2.xlsx (14.7 KB, 8 views)
Reply With Quote
  #9  
Old 05-19-2016, 08:05 AM
paxon paxon is offline if(and.. formula Windows XP if(and.. formula Office 2007
Novice
if(and.. formula
 
Join Date: Feb 2016
Posts: 13
paxon is on a distinguished road
Default

thanks to all of you for your help!!!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with dragging a formula and changing a reference column as I drag the formula. LupeB Excel 1 10-22-2015 03:02 PM
if(and.. formula Formula Help odonnest Excel Programming 8 01-23-2015 07:18 AM
if(and.. formula WHEN formula agent007 Excel 5 02-06-2014 09:20 PM
Formula Help clo312 Excel 11 01-11-2014 02:54 AM
if(and.. formula What formula should I use? TotalONE Excel 3 11-26-2013 01:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:56 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft