Get correspondence of the first (or second or last) word in a table

Bassplayer

New Member
Joined
Oct 22, 2013
Messages
11
I'm strugling with a problem. I can get the first correspondence in row, or the last value in a row but what I want is to get a correspondence within a table. I will give an example:
Sheet1
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]01-jan
[/TD]
[TD]02-jan
[/TD]
[TD]03-jan
[/TD]
[TD]04-jan
[/TD]
[TD]05-jan
[/TD]
[TD]06-jan
[/TD]
[/TR]
[TR]
[TD]PersonA
[/TD]
[TD]Contract A
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
Contrat B

<tbody>
</tbody>
[/TD]
[/TR]
[TR]
[TD]PersonB
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Contract A
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PersonC
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Contract B
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PersonB
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Contract C
[/TD]
[/TR]
</tbody>[/TABLE]

Sheet2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Contract A
[/TD]
[TD]x
[/TD]
[TD][/TD]
[TD]x
[/TD]
[TD][/TD]
[TD]x
[/TD]
[/TR]
[TR]
[TD]Contract B
[/TD]
[TD][/TD]
[TD]x
[/TD]
[TD][/TD]
[TD]x
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Contract C
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]x
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

For example, if I put Contract A in 01-Jan and 05-Jan, it should appear on the table of Sheet2 the date 01-jan on the first "x" in the Contract A row (the x is just where a formula shoud be, it doesn´t have to be an X) and 05-Jan on the second X.

Is it possible to get this working like this? Thanks in advance. I´ve tried with index, vlookup etc but i´m not getting it.

Cheers
 
If you have Sheet1!B$1 located in cell B2 ...

and you copy it to cells C2 to G2 ...

you will get an adjustment for each column ...

Please input the Formula in cell B2 ...

And then copy it down and right ...
 
Last edited:
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I understood that and appreciate your help. It will suit great for another task. But in this case, sheet2 will only have 12 columns max, in sheet 1 you will have 1 column for each day of the year so you will have 365 columns.
 
Upvote 0
Sorry ...I do not understand your last message ...

Is the formula producing the results you expected ...???
 
Upvote 0
for this case is not. The only part missing is getting the date that is above the first correspondence.
What you said about copy to right will not work because in sheet1 we will have 365 columns and on sheet2 we will have 12 columns. i´ve tried with offset but i´m not getting it
 
Upvote 0
So ...

your Sheet 1 displays Daily Columns ...

and

your Sheet 2 displays Monthly Columns ...

Is that right ...?

If Yes ... can you clearly explain what should appear in Sheet 2 ...
 
Upvote 0
Yes. Example:

In sheet1 let´s say I have a date in January for Contact A and the second date is in March. I want that in sheet2 to appear da January date on the first column and the March date in the third column. But now lets say that there is a delay and the March date goes do April. On the second column of sheet2 it shoud appear the april date because it is the second date to be added.
 
Upvote 0
Very Confusing ...

But now lets say that there is a delay and the March date goes do April. On the second column of sheet2 it shoud appear the april date because it is the second date to be added.

The second Column in Sheet 2 should be February .... and not April ...
 
Upvote 0
If you have the possibility of uploading a sample file on DropBox or Google Drive ...

This could help clarify your constraints ...
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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