Sort a range based on 6th column in the range of Excel workseet

I have ranged names that go from column A to Column E. However, after updating data via a form, I need to sort the data, but it is based on the data in column F. How do I tell it to sort on Column F in the range?

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Sid, actually, I solved it. I found first that I was putting the code in the wrong place. I really belongs in the module that dynamically resets the ranges. I have attached what works.

Public Sub DynamicRangeSettingsBondProfile()'THIS IS FOR THE Settings WORKSHEET!!! It re-sets the entire range for the profile that will be'populated from the frmAddProfile form as the data has been entered or after any profiles'have been closed - closed by the frmCloseProfile formOn Error GoTo ErrorHandler'If user adds a new Bond profile, this dynamically determines what the'new ranges will be. Need to lock the column headers just to be sure.Dim strRange As RangeDim strAddress As StringDim varName As VariantDim i As IntegerDim intEnd As IntegerDim intRowNum As IntegerDim intAddressNum As IntegerDim rngVarName As Range'First, find where the data source area startsWith ThisWorkbook.Worksheets("Settings").Range("A:A") For Each varName In Array("ss_ACTIVEPORTFOLIOS", "ss_ACTIVEMISC", "ss_ACTIVEPORTFOLIOMASTERSTATS", _ "ss_INDEXSTANDARDPORTFOLIOS", "ss_INDEXMISCELPORTFOLIOS", "ss_INDEXSUPERFUNDPORTFOLIOS", _ "ss_INDEXPORTFOLIOMASTERSTATS") Set strRange = .Find(varName, LookIn:=xlValues) strAddress = strRange.Address'Initialize loop counter to seed its value i = 1 'Loop through the fields until a blank row is hit, this is the end of the range Do Until .Range(strAddress).Offset(i, 0) = "" i = i + 1 Loop intRowNum = .Range(strAddress).Row 'Row for varName address intAddressNum = intRowNum + 2 'Start range below headers for group intEnd = (intRowNum + i) - 1 'Last row for end of range .Range("A" & intAddressNum & ":K" & intEnd).Name = varName 'Range name in workbookWith ThisWorkbook.Worksheets("Settings").Range(strRange) .Select .Sort Key1:=Range(strRange).Cells(1, 6), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End With NextEnd WithExit_ErrorHandler: Exit SubErrorHandler: MsgBox Err.Number & " Description: " & Err.Description Resume Exit_ErrorHandlerEnd Sub

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …

This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.