1. ## Formulas & VBA

I've got various ranges on a worksheet. Each row represents a different call type, while each column represents a different call time. The statistics represent what types of calls are being taken at what times.

I have a userform, which is used to record call time and automatically put it onto a main worksheet. Part of this userform contains five option buttons (Basic, Tech, Billing, Matters, Pricing) for various call types. When the user clicks on the call-type, I want the cell it represents to do the following:

Recognize the time (narrowed down to the hour the call was taken), and use the data from the corresponding call type to place a "1" in the proper cell.

If there is already a "1" in that cell, increase the digit incrementally by one.

Example:

Representative takes a call at 5:23am. They determine that the call is a "Basic" Call. They click on the "Basic" option button. The system determines that it is in the 5 o'clock hour, and places a "1" in Sheet2.Range("B" & 21). The rep then takes another call at 5:48am. They determine that the call is a "Basic" Call, they click on basic, the system determines that the call was recieved in the 5o'clock hour, recognizes that there is a "1" in the field type, and adds a "1" to the field.

It's clear as mud I know, if you have any questions, please feel free to let me know!

Thanks MILLIONS!!!

Drk.

2. ## Re: Formulas & VBA

With Worksheets("Sheet2").Range("B" & 21)
If .Value = "" Then
.Value = 1
Else
.Value = .Value + 1
End If
End With

3. ## Re: Formulas & VBA

How can I make it recognize the time?

Column "B" is only good for the 5am hour, "C" is the 6am hour, etc..

Thanks for all your help Legare! I've got you in the credits! [img]/S/smile.gif[/img]

Drk.

4. ## Re: Formulas & VBA

Any ideas? [img]/forums/images/smilies/smile.gif[/img]

Drk.

5. ## Re: Formulas & VBA

<pre>With Worksheets("Sheet2").Range("B21").Offset(0,hour-5)
If .Value = "" Then
.Value = 1
Else
.Value = .Value + 1
End If
End With
</pre>

In the above, you need to replace "hour" with with whatever has the hour.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•