# Cell distance calculating

#### ElliotDark

##### New Member
Hey guys, I really need some help on this. Been trying to work out a offset formula on this but the table size isn't always the same, it can be 1-30 days.

 John Doe in out Total 21.april.2012 20:00 22:00 4 hrs 22.april.2012 20:00 22:00 4 hrs Total: 8 hrs

<tbody>
</tbody>

Trying to use the name as the key, like this:
 Name Worked hrs John Doe 8 hrs

<tbody>
</tbody>

Is it possible to find the distance between "John Doe" and the cell with the total and use that as the offset or does anyone have a better idea on how to do this?

I really appricate your time and effort!

### Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi,
With the function MATCH you can find the row with "Total:"
Example:MATCH("Total:";C1:C65000;0)-1
and then use OFFSET.
Assuming that your example table starts with cell A1, the final formula is:
=OFFSET(D1;MATCH("Total:";C1:C65000;0)-1;0)

Hi,
With the function MATCH you can find the row with "Total:"
Example:MATCH("Total:";C1:C65000;0)-1
and then use OFFSET.
Assuming that your example table starts with cell A1, the final formula is:
=OFFSET(D1;MATCH("Total:";C1:C65000;0)-1;0)

Thank you Wizz, this works. Im trying to move it down as I have a multiple time sheets. I only need to move both D1 and C1 to another range like which would just be the next name.

Do you have any idea on how to do that?

Thanks again!

Replies
3
Views
229
Replies
3
Views
131
Replies
1
Views
166
Replies
1
Views
273
Replies
3
Views
92

1,203,529
Messages
6,055,933
Members
444,836
Latest member
nVaNL

### 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.

### Which adblocker are you using?

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

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