WorksheetFunction.MAX + tables

JimJohnson

New Member
Joined
Apr 29, 2008
Messages
36
I am trying to get the maximum value in a range, which is part of a table (named tbl_range).

I'm wondering if, instead of doing this (which works):
nch_y_axis = Application.WorksheetFunction.max(Sheets("TrendRaw").Range("F2:F10"))

I could something along the lines of (which does not work):
nch_y_axis = Application.WorksheetFunction.max(Range(tbl_trend[nch_con_som]))

sheet name: TrendRaw
table name: tbl_trend
column name: nch_con_som
column letter: F
last row of data: 10

I know I can grab the last row and find the column number containing the column name dynamically, but I'm just wondering if I can references the column within the table directly, as I would in a normal formula.

Thanks!
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try adding quotes around the table reference

nch_y_axis = Application.WorksheetFunction.max(Range("tbl_trend[nch_con_som]"))
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,496
Members
449,089
Latest member
Raviguru

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