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!
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!