+ Reply to Thread
Results 1 to 2 of 2

Dates in Array, Counter (VBA Code Only)

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Dates in Array, Counter (VBA Code Only)

    I have a section of code I am having trouble with. It works when there are 2 instances (my basic test) but I need it to work when there are 3 or more instances.

    ScreenShot388.jpg

    The 08/30/10 date shouldn't be payable but because the code is static, not dynamic...

         If hcpc(i) = "97002" Or hcpc(i) = "97004" Then
                        reval_date(reval_count) = iDate(i)
                        Select Case reval_count
                            Case 1
                                feevalue(i) = ruv(i) * convfactor
                                reason(i) = "Phys Fee Sched"
                                reval_count = reval_count + 1
                            Case Else
                                If (reval_date(2) - reval_date(1)) < 30 Then      <----- need for the (2) & (1) to be dynamic 
                                    feevalue(i) = 0
                                    reason(i) = "Phys Fee Sched/30 Day Rule"
                                Else
                                    feevalue(i) = ruv(i) * convfactor
                                    reason(i) = "Phys Fee Sched"
                                End If
                        End Select
                    End If

  2. #2
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Dates in Array, Counter (VBA Code Only)

             If hcpc(i) = "97002" Or hcpc(i) = "97004" Then
                        reval_date(reval_count) = iDate(i)
                        Select Case reval_count
                            Case 1
                                feevalue(i) = ruv(i) * convfactor
                                reason(i) = "Phys Fee Sched"
                                reval_count = reval_count + 1
                            Case Else
                                If (reval_date(2) - reval_date(1)) < 30 Then
                                    feevalue(i) = 0
                                    reason(i) = "Phys Fee Sched/30 Day Rule"
                                    reval_date(2) = reval_date(1)
                                Else
                                    feevalue(i) = ruv(i) * convfactor
                                    reason(i) = "Phys Fee Sched"
                                    reval_date(1) = reval_date(2)
                                End If
                        End Select
                    End If
    The above code is working apparently. If someone can see an issue with the code, please let me know.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1