# Having "close" equal 9 p.m.

#### jordan11221992

##### New Member
When making my schedule it links to my labor calculator on sheet2. Telling me labor dollars to be spent each day monday-sunday. On sheet1 I want to be able to schedule who ever is closing on monday or tuesday or any day of the week and use the word "close" instead of having to put a time in for their out time. So on monday if jake and brett are working, jakes in-time is 4 p.m. amd his out time is 8 p.m.. On sheet2 it tells me 4 for his scheduled hours on monday. Lets say bret is the closer on Monday. I want to be able to schedule his in-time for 5 p.m. and his out time say "close".. "Close" being 9 p.m. letting sheet 2 tell me 4 for bretts scheduled hours on Monday. Is this possible?

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

##### Well-known Member
Welcome to MrExcel Message Board.

#### jordan11221992

##### New Member
I want to enter "close" instead of an actual out time for whom ever is scheduled the times ive listed beneath each day of the week. It changes week by week on who closes.

##### Well-known Member
What About Macro & VBA. Are you Can work with them?
If no Problem. Try this:
VBA Code:
Sub CloseReplace()
Dim Lr As Long, Mx As Double, LC As Long, i As Long, j As Long

Lr = Cells(Rows.Count, 1).End(xlUp).Row
LC = Cells(1, Columns.Count).End(xlToLeft).Column
For j = 4 To LC Step 2
Mx = Application.WorksheetFunction.Max(Range(Cells(8, j), Cells(Lr, j)))
For i = 8 To Lr
If Cells(i, j).Value = Mx Then
Cells(i, j).Value = "Close"
End If
Next i
Next j
End Sub

Replies
7
Views
156
Replies
4
Views
126
Replies
0
Views
80
Replies
1
Views
104
Replies
12
Views
498

### Forum statistics

1,127,589
Messages
5,625,671
Members
416,125
Latest member
NeedExcelHelp2021

### 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.

### Which adblocker are you using?

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

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