Results 1 to 5 of 5

Thread: Formulas & VBA

  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formulas & VBA

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

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formulas & VBA

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

    Drk.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.
    Legare Coleman

Posting Permissions

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