dougmarkham
Active Member
- Joined
- Jul 19, 2016
- Messages
- 252
- Office Version
- 365
- Platform
- Windows
Hi Folks,
Couldn't find anything on Google for this, so thought I'd ask.
If my active cell was in D4 and the next cell to the left of D4 with a data value in was B4:
Is it possible via VBA to determine the offset number from the Active cell (in this case -2)?
My goal is to carry out a recursive operation in a particular column to cut and paste the contents of that column to the furthest blank cell to the left, hence the need to know the offset.
In general, is it possible via VBA code to measure the number of cells from an active cell (both left and right) before reaching a cell with data in it?
Kind regards,
Doug
Couldn't find anything on Google for this, so thought I'd ask.
If my active cell was in D4 and the next cell to the left of D4 with a data value in was B4:
Is it possible via VBA to determine the offset number from the Active cell (in this case -2)?
My goal is to carry out a recursive operation in a particular column to cut and paste the contents of that column to the furthest blank cell to the left, hence the need to know the offset.
In general, is it possible via VBA code to measure the number of cells from an active cell (both left and right) before reaching a cell with data in it?
Kind regards,
Doug