Hi there,
I'm attempting to return the minimum value from a range I've selected but I'm unsure how I can select the minimum value in the range (only) where the cells (in the range) are formatted thus:
£#,##0.00;[Red]-£#,##0.00
The VBA code I've used is as follows to get the MIN value and this works for my purposes:
Range("E2").Select
Selection.AutoFilter Field:=5, Criteria1:=extvalueB
ActiveSheet.AutoFilter.Range.Offset(1).SpecialCells(xlCellTypeVisible).Cells(1, 5).Select
Set Rng = ActiveCell.Offset(, 1).Resize(, 100)
answer = Application.WorksheetFunction.Min(Rng)
So if the range was like "1,1,£5.00" I'd be hoping to return the £5.00. At the moment I can only get the value 1 as the answer.
Could someone possibly help me out here? I've trawled google looking for something that I can use but with no success thus far.
I'm attempting to return the minimum value from a range I've selected but I'm unsure how I can select the minimum value in the range (only) where the cells (in the range) are formatted thus:
£#,##0.00;[Red]-£#,##0.00
The VBA code I've used is as follows to get the MIN value and this works for my purposes:
Range("E2").Select
Selection.AutoFilter Field:=5, Criteria1:=extvalueB
ActiveSheet.AutoFilter.Range.Offset(1).SpecialCells(xlCellTypeVisible).Cells(1, 5).Select
Set Rng = ActiveCell.Offset(, 1).Resize(, 100)
answer = Application.WorksheetFunction.Min(Rng)
So if the range was like "1,1,£5.00" I'd be hoping to return the £5.00. At the moment I can only get the value 1 as the answer.
Could someone possibly help me out here? I've trawled google looking for something that I can use but with no success thus far.