THE_NEW_XL_GUY
New Member
- Joined
- Dec 20, 2017
- Messages
- 47
Hi guys,
Need some help in finding max value in a column with column name. like search max value in a column with the column name I provide.
conditions: column May or May not be present in sheet.
there are 3 or 4 columns with same column name and I need to check all.
current code I have just finds max value in range.
Really need some directions on this. thanks in advance.
Need some help in finding max value in a column with column name. like search max value in a column with the column name I provide.
conditions: column May or May not be present in sheet.
there are 3 or 4 columns with same column name and I need to check all.
current code I have just finds max value in range.
Code:
Private Sub Cmd_tt_today_bps_Click()
Dim fNameAndPath As Variant, wb As Workbook, ws As Worksheet
fNameAndPath = Application.GetOpenFilename(FileFilter:="Excel Files (*.CSV), *.CSV", Title:="Select File To Be Opened")
If fNameAndPath = False Then Exit Sub
Set wb = Workbooks.Open(fNameAndPath)
max_num = Application.WorksheetFunction.Max(Range.Name)
wb.Close savechanges:=False
Really need some directions on this. thanks in advance.