Possible Syntax error with lookup formula

mfd2112

Board Regular
Joined
Jan 2, 2010
Messages
86
This formula</SPAN>

IF(AND(J7<=0),NOT(ISBLANK(D7),VLOOKUP(D7,Miles!$C$3:$R$12,16,0)),0)</SPAN>

Must be written wrong.</SPAN>

I would like to have K7 use VLOOKUP to find a value if J7<=0 and D7 NOT(ISBLANK, but if J7 is > 0 and D7 is blank then K7 would contain 0.000</SPAN>

Any help is appreciated,</SPAN>

Dale.</SPAN>
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Just some misplaced parens
The one highlighted RED is ENDING the AND function, and should be after the NOT function.
The one highlighted BLUE should be ending the NOT function.
IF(AND(J7<=0),NOT(ISBLANK(D7),VLOOKUP(D7,Miles!$C$3:$R$12,16,0)),0)

IF(AND(J7<=0,NOT(ISBLANK(D7))),VLOOKUP(D7,Miles!$C$3:$R$12,16,0),0)
 
Upvote 0

Forum statistics

Threads
1,215,005
Messages
6,122,661
Members
449,091
Latest member
peppernaut

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