How to vlookup a general format cell and convert it to a date

phillipc1

New Member
Joined
Oct 11, 2023
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am trying to perform a vlookup to pull in a date that exists as "General" on the source sheet, but I am unsure how to use the formula to reformat it as a "date" on the destination sheet. I have tried using the text function with the vlookup but it was returning #value. I have the information below. I want the date to come in as "m/dd/yyyy" to the destination sheet.

Source Sheet
Book1
ABCDEFGHIJKL
1CompanyIDCompanyBranchBranchNameBranchDisplayNameOperationalStatusActiveYNLongitudeLatitudeBranchIDDateOpenedIDDateAcquiredID
22020406REGION 20 SAFETY TRAINING0406 - REGION 20 SAFETY TRAININGDY-113.4479953.5780034052016081220160812
32020407VANCOUVER MFS0407 - VANCOUVER MFSDY-122.8199649.2321734062016030220141101
42020409DOWNTOWN VANCOUVER0409 - DOWNTOWN VANCOUVERAY-123.0823749.2797954082016082620160701
Sheet2


Destination Sheet

Book1
ABC
2BranchDateopenedDateAcquired
304062016081220160812
404072016030220141101
504092016082620160701
Sheet1
Cell Formulas
RangeFormula
B3:B5B3=VLOOKUP(A3,Sheet2!C:L,9,FALSE)
C3:C5C3=VLOOKUP(A3,Sheet2!C:L,10,FALSE)
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
How about
Excel Formula:
=--TEXT(VLOOKUP(A3,Sheet2!C:L,9,FALSE),"0000-00-00")
and format the cell as a date.
 
Upvote 0
Solution
Maybe this if formatting the values as date is not an option, also assuming your current date is yyyymmdd, and not yyyyddmm.
Book1
ABC
1
2BranchDateopenedDateAcquired
340608/12/201608/12/2016
440703/02/201611/01/2014
540908/26/201607/01/2016
Sheet3
Cell Formulas
RangeFormula
B3:B5B3=LET(d,VLOOKUP(A3,Sheet2!C:L,9,FALSE),MID(d,5,2)&"/"&RIGHT(d,2)&"/"&LEFT(d,4))
C3:C5C3=LET(d,VLOOKUP(A3,Sheet2!C:L,10,FALSE),MID(d,5,2)&"/"&RIGHT(d,2)&"/"&LEFT(d,4))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,101
Messages
6,123,088
Members
449,095
Latest member
gwguy

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