Excel: how to search a table for a value and copy the cell next to it?
I'm trying to have Excel match the dates from a table to a timeline. If the date in the column matches a date on the timeline, than I want it to copy the cell next to the date from the original column. The idea is that I can transfer a list of dates to a timeline without entering all the dates on the timeline.
Example:
A B
1 1/1/2000 Car Accident
2 1/2/2000 Windshield Fixed
3 1/9/2000 Lights Fixed
C D E
Should display Should Display Should Remain Empty
5 "Car accident" "Window Fixed" “ “
6 1/1/2000 1/2/2000 1/3/2000
So far I've put together something like this as a formula:
=IF(VLOOKUP(C6,$A:$A,1,FALSE),B1," ")
Which means if any cell in column A matches the cell C6 exactly, then copy cell B1, otherwise leave it blank. But i dont want it to just copy B1, I want it to copy the cell next to the cell that has the corresponding correct date match. Also, the formula is displaying "N/A" instead of being blank when the IF statement is false.
Is there a way to reference a cell next to another cell that is found in a column?
The value where “B1” is needs to be able to reference the cell next to the matched the date value. So that no matter where the cell is matched, it can display the accurate event next to the date.
There could be a better way to do this altogether, i just dont know another way. Maybe a macro?
The date needs to be linked to the event, while at the same time, the date on the timeline needs to realize that an event exists for that date.
Bookmarks