Matching Dates to Cell Data

Tseelu

New Member
Joined
Jan 14, 2016
Messages
7
Hello,

I had a question that I was hoping to get some help with.



I have a spreadsheet that has dates in Column A and dates in Column J.



I would like to Match the Dates in Column J with the dates in Column A. When the match is found, I would like the contents of the Adjacent cells to matching-date-cell in Column J (Namely K,L,M,N and O) to be be entered into the Adjacent Cells of matching-date-cell of Column A (Namely B,C,D,E and F).



Example 1: Cell J1's Date is 9/7/1971 and Cell A1's date is 9/7/1971, so I would like the contents of cells K1,L1,M1,N1 and O1 to be placed in cells B1,C1,D1,E1 and F1.


Example 2; Cell J12 has the date 9/22/1971 and BOTH Cells A18 and A19 also have the date 9/22/1971, so I would like the contents of cells K12,L12,M12,N12 and O12 to be placed in cells B18,C18,D18,E18 and F18 AND B19,C19,D19,E19 and F19.

My spreadsheet I am working with is quite large and includes data in 33,607 Rows of Column A and 11,604 Rows in Columns J,K,L,M,N and O.





Thank you in advance for any insight you can give.
 
Last edited:

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
This can be done pretty easily using the VLOOKUP function.
(see here for a detailed explanation: https://www.techonthenet.com/excel/formulas/vlookup.php)

For your specific example, enter this formula in cell B1:
Code:
=VLOOKUP($A1,$J:$O,COLUMN(),FALSE)
then copy out to columns C:F
and copy down for all your rows
 
Upvote 0
This can be done pretty easily using the VLOOKUP function.
(see here for a detailed explanation: https://www.techonthenet.com/excel/formulas/vlookup.php)

For your specific example, enter this formula in cell B1:
Code:
=VLOOKUP($A1,$J:$O,COLUMN(),FALSE)
then copy out to columns C:F
and copy down for all your rows

Thank you Joe. I had to shift some of my data around, and "I believe" I made the necessary adjustments to the Code you provided. I am getting a #Ref ! error. I will attempt to attach a screen shot for you to see. Thank you again.
 
Last edited by a moderator:
Upvote 0
We cannot see your image attempt. I removed the bad code it created.
There are tools you can use to post screen images. They are listed in Section B of this link here: http://www.mrexcel.com/forum/board-a...forum-use.html.
Also, there is a Test Here forum on this board that you can use to test out these tools to make sure they are working correctly before using them in your question.

Can you post the formula you used after you made your adjustments to it?
 
Upvote 0
Hi Joe,
Thank you for deleting my mistake. I thought to rephrase my question, so that you can see now what adjustments I made. It's basically the same question, but with the new cell references. I haven't posted this again, but simply for you to see.

Hello,
I have a question that I was hoping to be able to get help with.

I have a spreadsheet that has dates in Column A and dates in Column Q.

I would like to Match the Dates in Column J with the dates in Column A. When the match is found, I would like the contents of the Adjacent cells to matching-date-cell in Column Q (Namely R,S,T,U and V) to be be entered into the Adjacent Cells of matching-date-cell of Column A (Namely I,J,K,L and M).

Example 1: Cell J1's Date is 9/7/1971 and Cell A1's date is 9/7/1971, so I would like the contents of cells R1,S1,T1,U1 and V1 to be placed in cells I1,J1,K1,L1 and M1.

Example 2; Cell Q12 has the date 9/22/1971 and BOTH Cells A18 and A19 also have the date 9/22/1971, so I would like the contents of cells R12,S12,T12,U12 and V12 to be placed in cells I18,J18,K18,L18 and M18 AND I19,J19,K19,L19 and M19.

Your code that I attempted to modify in order to accommodate the adjustments I made is as follows:
=VLOOKUP($A1,$Q:$V,COLUMN(),FALSE)
 
Upvote 0
Example 1: Cell J1's Date is 9/7/1971 and Cell A1's date is 9/7/1971, so I would like the contents of cells R1,S1,T1,U1 and V1 to be placed in cells I1,J1,K1,L1 and M1.
Should that be Q1 and not J1?

Assuming that is the case, your formula in I1 should be:
Code:
=VLOOKUP($A12,$Q:$V,[COLOR=#ff0000][B]COLUMN()-7[/B][/COLOR],FALSE)

The key is understanding how this third argument works.
The range Q:V has 6 columns in it.
We want to return the 2nd column in column I, the 3rd column in column J, etc.

The COLUMN() function will return the column number of the column the formula is located in.
Column I is 9th column, column J is the 10th column, etc.
So we just want to subtract 7 from COLUMN() to get 2, 3, etc.

Make sense?
 
Last edited:
Upvote 0
See the edit I made to my previous post.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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