Finalfight40
Active Member
- Joined
- Apr 24, 2018
- Messages
- 273
- Office Version
- 365
- Platform
- Windows
Hi All
I am looking for a little advice as i expect i am going to get a spreadsheet soon with exported data and i wanted to get a head start on a piece of VBA that i'm not aware how to do:
So i have the example data below as follows:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Name[/TD]
[TD]Date[/TD]
[TD]Time In[/TD]
[TD]Time Out[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John[/TD]
[TD]######[/TD]
[TD]######[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD]####[/TD]
[TD]########[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD]####[/TD]
[TD]#####[/TD]
[TD]####[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Jamie[/TD]
[TD]###[/TD]
[TD]#####[/TD]
[TD]#######[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD]#####[/TD]
[TD]######[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Bob[/TD]
[TD]####[/TD]
[TD]#####[/TD]
[TD]#####[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Polly[/TD]
[TD]####[/TD]
[TD]######[/TD]
[TD]#####[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD]#######[/TD]
[TD]####[/TD]
[TD]#######[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD]######[/TD]
[TD]####[/TD]
[TD]###[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD][/TD]
[TD]###[/TD]
[TD]######[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD]####[/TD]
[TD]#######[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]Jeff[/TD]
[TD]####[/TD]
[TD]######[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD][/TD]
[TD]######[/TD]
[TD]####[/TD]
[TD]######[/TD]
[/TR]
</tbody>[/TABLE]
So there would be 1 thing i was hoping to get advice on.
Lets say my active cell is currently on John. How could i determine the number of blank cells below John in Column A before i reached Jamie. (So for this example 2)
Also this would need to work for an example like Bob where it would return 0 blank cells.
I am looking for a little advice as i expect i am going to get a spreadsheet soon with exported data and i wanted to get a head start on a piece of VBA that i'm not aware how to do:
So i have the example data below as follows:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Name[/TD]
[TD]Date[/TD]
[TD]Time In[/TD]
[TD]Time Out[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]John[/TD]
[TD]######[/TD]
[TD]######[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD]####[/TD]
[TD]########[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD]####[/TD]
[TD]#####[/TD]
[TD]####[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Jamie[/TD]
[TD]###[/TD]
[TD]#####[/TD]
[TD]#######[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD]#####[/TD]
[TD]######[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Bob[/TD]
[TD]####[/TD]
[TD]#####[/TD]
[TD]#####[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Polly[/TD]
[TD]####[/TD]
[TD]######[/TD]
[TD]#####[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD]#######[/TD]
[TD]####[/TD]
[TD]#######[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD]######[/TD]
[TD]####[/TD]
[TD]###[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD][/TD]
[TD]###[/TD]
[TD]######[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD]####[/TD]
[TD]#######[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]Jeff[/TD]
[TD]####[/TD]
[TD]######[/TD]
[TD]######[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD][/TD]
[TD]######[/TD]
[TD]####[/TD]
[TD]######[/TD]
[/TR]
</tbody>[/TABLE]
So there would be 1 thing i was hoping to get advice on.
Lets say my active cell is currently on John. How could i determine the number of blank cells below John in Column A before i reached Jamie. (So for this example 2)
Also this would need to work for an example like Bob where it would return 0 blank cells.
Last edited: