Vlookup inside an if formula

saraapple

Board Regular
Joined
Feb 3, 2020
Messages
165
Office Version
  1. 2010
Platform
  1. Windows
I am trying to write and if statement that includes a vlook up if the answer is true. Where do I put the vlookup?
=IF(G12=1,"Y","N") is my basic formula how would I add the vlookup rather than it returning the value "Y"

Many thanks
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
This should guide you.

=IF(G12=1,VLOOKUP(Cell,Table,Column,False,"N")
 
Upvote 0
Thank you, I am getting a #value error!
This is my formula
=IF(G12=1,VLOOKUP('Time Changes'!A:F,5,FALSE,"N"))
 
Upvote 0
Think he missed the closing ) on vlookup, try

=IF(G12=1,VLOOKUP('Time Changes'!A:F,5,FALSE),"N")
 
Upvote 0
Change
=IF(G12=1,VLOOKUP('Time Changes'!A:F,5,FALSE,"N"))
To
=IF(G12=1,VLOOKUP(G21,'Time Changes'!A:F,5,FALSE),"N")
 
Upvote 0
It should be
=IF(G12=1,VLOOKUP(G12,'Time Changes'!A:F,5,FALSE),"N")

assuming you are trying to lookup the value of G12
 
Upvote 0
Happy to help and thank you for letting us know you have a working solution. (y)
 
Upvote 0

Forum statistics

Threads
1,215,136
Messages
6,123,243
Members
449,093
Latest member
Vincent Khandagale

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