Help If vlookup

jynxy

New Member
Joined
Feb 13, 2022
Messages
32
Office Version
  1. 2019
Platform
  1. Windows
Hi,

im trying to do a vlookup and if there is a value then show "CH", i can get this to work until there is no result and i have tried IFNA, IFERROR etc but always get the incorrect result.

basically im trying to lookup a date, check if a 3rd column has a value and if so return "CH" otherwise carry on with the next if, the problem is i can only get this to work with a double if, which then stops the next if working if no date is found, or it will show CH even if there is no value in the 3rd column. below is the sort of thing i am looking for, but i need it to ignore if there is no date and no value in 3rd column, hope this makes sense.

Excel Formula:
=if(vlookup(A1,c1:f20,3,FALSE)="y","CH",if(.......
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi, welcome to MrExcel board.

kindly share the excel sheet also using XL2BB to identify the issue.

Thanks,
Saurabh
 
Upvote 0
you will get either a 0 returned if the date does exist but no value in column 3
or a N/A error if no date exists

does this work
=IF(IFERROR(NOT(VLOOKUP(A1,C1:F20,3,FALSE)=0),FALSE),"CH","New IF")

I suspect there maybe a cleaner way to dp the test
(IFERROR(NOT(VLOOKUP(A1,C1:F20,3,FALSE)=0),FALSE)
This will Text for an Error and return FALSE
also test for a no entry in column 3
BUT if zero is entered into column 3 , then this will also return a false
as a 0 or no entry in column 3 returns a zero
as show below

also the 3 conditions , highlighted in yellow,orange,geen - just for view here

Book3
ABCDEFG
11/8/211/1/210CH
21/2/211
31/3/21
41/4/211/4/21New IF
51/5/21
61/6/21
72/12/211/7/21New IF
81/8/212
91/9/21
101/10/21
111/11/21
121/12/213
131/13/21
Sheet2
Cell Formulas
RangeFormula
G1,G7,G4G1=IF(IFERROR(NOT(VLOOKUP(A1,C1:F20,3,FALSE)=0),FALSE),"CH","New IF")
 
Upvote 0
Solution

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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