ascending list problem

Hovrzone

New Member
Joined
Dec 7, 2009
Messages
17
I have an ascending list that is a list of time blocks ie:0000-0806, 0030-0836.
The list starts at 0000-0806 and would like it to start at 0800-1606 but need help.

Regards,

Brett
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

jim may

Well-known Member
Joined
Jul 4, 2004
Messages
7,480
would like it to start at 0800-1606 << ??? huh? tell us more; this is a bit confusing.
 

Hovrzone

New Member
Joined
Dec 7, 2009
Messages
17
Thanks Jim,

I have a data validation list that uses the code attached below which lists the time slots in ascending order, which naturally starts with 0000-0806 (midnight to 6 minutes past 8 in the morning). I have created the list so that it deleted blank cells and also if a time that is entered into a worksheet is not in the list it gets added

I would like the lsit to start at 0800-1606 not 0000-0806.

If Application.WorksheetFunction.CountIf(ws.Range("PickList"), Cells(iRow, iCol).Value) Then
Exit Sub
Else
i = ws.Cells(Rows.Count, 1).End(xlUp).Row + 1
ws.Range("A" & i).Value = Cells(iRow, iCol).Value
'then sort the validation list
ws.Range("PickList").Sort Key1:=ws.Range("A1"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
 

jim may

Well-known Member
Joined
Jul 4, 2004
Messages
7,480
Why not Start your Range name ("PickList") with the row # 0800-1606,
Or am I missing something here
Or Why not eliminate delete all rows prior to the 0800-1606 row?
 

Watch MrExcel Video

Forum statistics

Threads
1,123,123
Messages
5,599,834
Members
414,341
Latest member
Mohammedsobhey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top