find row and column in table

storm8

Active Member
Joined
Apr 7, 2010
Messages
327
Hi, I set listobject.databodyrange as range and then I loop trough each cell and want to find find out what row and column the cell is in the table (so I can get first row/column values as variables), but I cannot figure out how to do this.

cell.listobject.row would not work and did not found anything that would help.

any suggestions?

thank you.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Code:
Sub test()
Dim UsedRng As Range
Dim FirstRow As Long, FirstCol As Long, FirstVal As Double
Set UsedRng = ActiveSheet.UsedRange
FirstRow = UsedRng(1).Row
FirstCol = UsedRng(1).Column
FirstVal = Cells(FirstRow, FirstCol).Value
End Sub
 
Upvote 0
this doesn't work: it gives me address of cell relative to worksheet, but I need it relative to table (listobject). eg if my table databodyrange is b3:F7 i want to get row and column of each cell in databodyrange, so the first result would be R1C1, next one R1C2 etc...
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,276
Members
449,075
Latest member
staticfluids

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