Vlookup with Date
๐ฏ Vlookup with Date by using Concatenate:
You want to use VLOOKUP
to match based on multiple columns (e.g., Emp. Code
+ Attendance Date
) by combining them into a single helper column, both in your main sheet and in the lookup sheet (i.e., Master Data Sheet(Q4)
).
๐ ️ Steps to Use VLOOKUP
with CONCATENATE
:
Step 1: Add a Helper Column in Both Sheets
๐น In Master Data Sheet(Q4)
:
-
Insert a new column before column B or at the start.
-
In the new column (let’s say it's now column A), enter the formula to combine Emp. Code and Attendance Date:
(Assuming B = Emp. Code, C = Attendance Date)
-
Drag this formula down to apply to the whole dataset.
-
This will create unique lookup keys like
266332621/2/2025
.
Step 2: Add a Helper Column in the Current Sheet (Vlookup with Dates)
-
Insert a new column before column F or wherever needed.
-
In the new column (assume column G), use the same method to combine values:
This ensures your lookup value matches the format created in the master sheet.
Step 3: Use VLOOKUP with the Combined Key
In your Status column (e.g., cell F3), use:
=VLOOKUP(G3, 'Master Data Sheet(Q4)'!A:I, 9, FALSE)
Explanation:
-
G3
is your combined lookup key (Emp. Code + Attendance Date
) -
'Master Data Sheet(Q4)'!A:I
is the table range including the new helper column -
9
is the column index for Status (adjust if the structure changes) -
FALSE
ensures exact match
✅ Tips:
-
Make sure both combined values (Emp Code + Date) are in the same format (e.g., no extra spaces, consistent date formatting).
-
To avoid date format mismatches, wrap dates with
TEXT()
:and
๐งช Example:
In Master Data Sheet(Q4):
A (Helper) | B (Emp Code) | C (Date) | ... | I (Status) |
---|---|---|---|---|
266332261/2/2025 | 26633226 | 1/2/2025 | ... | P |
In VLookup with Dates:
A (Emp Code) | C (Date) | G (Helper) | F (Status) |
---|---|---|---|
26633226 | 1/2/2025 | 266332261/2/2025 | P |