How to get first left cell position and bottom right cell position from a table

Mathman

Board Regular
Joined
Jan 28, 2017
Messages
152
Office Version
  1. 2016
Platform
  1. Windows
What I'm try to accomplish.

I am pulling ranges from an excel file using python then creating an image. These are not set data tables, could have combo of number/text/empty cells. Now using Python I can manually input the 2 requirements needed, first top left cell then first right bottom cell but I need it to be dynamic.

Example area B4:F20 The thing is any of the 4 variables can change.

Can I do

somethin(B4) = B4? I can then do a column list with these start/end points in a separate sheet and they will not move and I can call it into a dataframe.

Here's' a post and all pictures are generated from excel. The black boarders are a column and row blacked out, These are the outer cells I need to call and be dynamic.
Examples of pictures taken from excel

Thank you

Help :)
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
This of any use, can be any cell within the table
MsgBox Range("B4").ListObject.Range.Address(0, 0)
 
Upvote 0
Your reply helped me get to this. Turns out it was rather simple just wasn't aware of this feature.

=CELL("address",B4)

Thanks again, this really helps me out a lot!
MM
 
Upvote 0
Solution

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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