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.
 

Some videos you may like

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Jameo

Active Member
Joined
Apr 14, 2011
Messages
270
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
 

storm8

Active Member
Joined
Apr 7, 2010
Messages
327
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...
 

Watch MrExcel Video

Forum statistics

Threads
1,123,530
Messages
5,602,192
Members
414,513
Latest member
junbuggle

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
Top