Mapping date from a sheet.

Marcus_230
Lounger
Posts: 37
Joined: 04 Oct 2023, 14:49

Mapping date from a sheet.

Post by Marcus_230 »

Hello,

I am trying to map a date from a sheet to another sheet based on ID. The first sheet Date missing! shows IDs in column A and it is grouped based on the external source. I am trying to map a date from sheet Date source! which is linked to the the IDs. Date should be only next to the IDs.
I am attaching sample workbook and as of now, I typed in the correct dates, so that it can be visible, what I am trying to accomplish.
Thank you.

M.
You do not have the required permissions to view the files attached to this post.

gailb
3StarLounger
Posts: 256
Joined: 09 May 2020, 14:00

Re: Mapping date from a sheet.

Post by gailb »

Try in B5 on the Date missing tab

=VLOOKUP(A5,'Date Source'!$A$5:$B$21,2,0)

Now copy and paste to the other cells in column B next to the ID's in column A

Marcus_230
Lounger
Posts: 37
Joined: 04 Oct 2023, 14:49

Re: Mapping date from a sheet.

Post by Marcus_230 »

gailb wrote:
08 Nov 2023, 23:39
Try in B5 on the Date missing tab

=VLOOKUP(A5,'Date Source'!$A$5:$B$21,2,0)

Now copy and paste to the other cells in column B next to the ID's in column A
I have tried that, but unfortunately, in the blanks, it shows #N/A. It needs to be blank, when no ID in column A. Attached.
You do not have the required permissions to view the files attached to this post.

gailb
3StarLounger
Posts: 256
Joined: 09 May 2020, 14:00

Re: Mapping date from a sheet.

Post by gailb »

Wrap it with IFERROR

=IFERROR(VLOOKUP(A5,'Date Source'!$A$5:$B$21,2,0),"")

Marcus_230
Lounger
Posts: 37
Joined: 04 Oct 2023, 14:49

Re: Mapping date from a sheet.

Post by Marcus_230 »

gailb wrote:
08 Nov 2023, 23:50
Wrap it with IFERROR

=IFERROR(VLOOKUP(A5,'Date Source'!$A$5:$B$21,2,0),"")
Yes, that worked. Is there also another way without the VLOOKUP? Such as IF with <>","?

gailb
3StarLounger
Posts: 256
Joined: 09 May 2020, 14:00

Re: Mapping date from a sheet.

Post by gailb »

Sure, try

=IF(A5<>"",VLOOKUP(A5,'Date Source'!$A$5:$B$21,2,0),"")

Marcus_230
Lounger
Posts: 37
Joined: 04 Oct 2023, 14:49

Re: Mapping date from a sheet.

Post by Marcus_230 »

gailb wrote:
09 Nov 2023, 00:00
Sure, try

=IF(A5<>"",VLOOKUP(A5,'Date Source'!$A$5:$B$21,2,0),"")
Yes, again, perfect.
Thank you very much. Very much appreciated.

gailb
3StarLounger
Posts: 256
Joined: 09 May 2020, 14:00

Re: Mapping date from a sheet.

Post by gailb »

You are welcome. Happy to help.

Marcus_230
Lounger
Posts: 37
Joined: 04 Oct 2023, 14:49

Re: Mapping date from a sheet.

Post by Marcus_230 »

I forgot to ask, what if the IDs are not sorted in ascending or descending order, but randomly? Would that be a problem with the VLOOKUP?

User avatar
HansV
Administrator
Posts: 79526
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Mapping date from a sheet.

Post by HansV »

No, VLOOKUP with 0 or FALSE as 4th argument does not require the first column of the lookup range to be sorted.
Best wishes,
Hans

Marcus_230
Lounger
Posts: 37
Joined: 04 Oct 2023, 14:49

Re: Mapping date from a sheet.

Post by Marcus_230 »

HansV wrote:
09 Nov 2023, 07:47
No, VLOOKUP with 0 or FALSE as 4th argument does not require the first column of the lookup range to be sorted.
Thank you very much for your explanation.
Best.