If Statement

Giggzz

Well-known Member
Joined
Jul 4, 2002
Messages
990
Need help getting this to work...

=VLOOKUP(DATEDIF(B20,$B$4,"y"),EMPLOYEES!$A$32:$G$36,MATCH(B18,EMPLOYEES!$A$31:$G$31,0))

This works now but I want it to excute when a number is place in H12:H13.

So I tried IF(H12:H13>0,=VLOOKUP(DATEDIF(B20,$B$4,"y"),EMPLOYEES!$A$32:$G$36,MATCH(B18,EMPLOYEES!$A$31:$G$31,0)),"")

But still no luck.. any ideas..Thanks as always :LOL:
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
For just one number in either cell ..

IF(COUNT(H12:H13)>0,VLOOKUP(DATEDIF(B20,$B$4,"y"),EMPLOYEES!$A$32:$G$36,MATCH(B18,EMPLOYEES!$A$31:$G$31,0)),"")

For a number in each cell ..

IF(COUNT(H12:H13)=2,VLOOKUP(DATEDIF(B20,$B$4,"y"),EMPLOYEES!$A$32:$G$36,MATCH(B18,EMPLOYEES!$A$31:$G$31,0)),"")
 

Watch MrExcel Video

Forum statistics

Threads
1,118,057
Messages
5,569,955
Members
412,300
Latest member
Chaneycr
Top