Get Maximum & Minimum Values in Worksheet Range
Sometimes, we need to find the max or min data in a worksheet.
If there are a few data, you can easily get the desire value manually. But if there are too many data in the worksheet, how to quickly select max or min data in Excel?
Example: =Max(1,2,7,4,5) or =Min(5,6,7,4,2,3)
Type the above function in a Worksheet Cell & press Enter. It will return 7 for Max & 2 for Min.
If you have a list of values in a range, then You should do the following steps:
- Select a blank cell to apply the max function beyond the range that you want to search for the max data.
- Then click Formulas > Autosum > Max, and then select the range you want to find the max data.
- Press Enter key, the max data will be selected in the cell.
For searching Min value do the same process except STEP 2, You have to do as follows:
Click Formulas > Autosum > Min, and then select the range you want to find the min data.
Finding Highest or Lowest Value in list using VBA
There is no separate function in VBA to find this. We have to use the same function in VBA Coding also.Find Smallest & Larges values in list using VBAVisual Basic12345678910Sub Find_Max_Value()Dim iArr'Get Range of Values from worksheetSet iArr = ThisWorkbook.Sheets("Sheet1").Range("A1:A10")'Find the max ValueMsgBox Application.WorksheetFunction.Max(iArr)MsgBox Application.WorksheetFunction.Min(iArr)End Sub
To execute this function, press F5. You will get a message box with largest value in the list.
Previous Post: How to Create a Drop down list in Google Sheets?
Next Post: How To Delete Facebook Account & Whatsapp Permanently?
How To Find Smallest & Largest value in a Range in Excel?
- Games VCF Countif Record Macro Timer in Excel Task Manager print screen HTML Table Import Data Thumbnails Text to Speech TTS Candy Crush Block Apps in FaceBook C++ Programing Machine learning AI bulk email Excel VBA vba color index vba color codes Android social media Twitter Google+ Google Adsense Tips bitcoin Calendar in Excel outlook vba mass email Data Mining Excel Macro Facebook WhatsApp python Wordpress