Nested select case

nunami9

New Member
Joined
Nov 7, 2013
Messages
6
This was working fine but I added an additional level of case select statements and now I get a 'Case without select' on the 2nd case of the top level Select (in code comments) Thanks for your suggestions.

Code:
            Select Case Cells(row, "AH").Value
                Case "Y"  'Secondary insurance IS available
                ClmPart1 = Join(Array(HL1, BILLER, BILLERADD, BILLERADD2, BILLERTIN, _
                            HL2, SBRPLAN, SBRNAME, SBRADD, SBRADD2, SBRDMG, PAYRNAME), "")
                            
                    Select Case Cells(row, "C").Value
                        Case "N"  'Subscriber is not the patient
                        
                            Select Case Cells(row, "BO").Value
                                Case "1" 'Original Claim Submission
                                
                                   ClmPart2 = Join(Array(PTLOOP, CLM, AMT, NTE, HI, SVCLOC, SVCADD, SVCADD2, _
                                   OTHSUB, OTHINS, OTHSUBNAME, OTHADD, OTHADD2, OTHPAYER, _
                                   LX, SVC, DTP, RENPROVNM), "")
                                   
                            Select Case Cells(row, "BO").Value
                                Case Else 'Claim Resubmission
                                
                                  ClmPart2 = Join(Array(PTLOOP, CLM, RESUBREF, AMT, NTE, HI, SVCLOC, SVCADD, SVCADD2, _
                                   OTHSUB, OTHINS, OTHSUBNAME, OTHADD, OTHADD2, OTHPAYER, _
                                   LX, SVC, DTP, RENPROVNM), "")
                            End Select
                            
                        Case Else  'Subscriber IS the patient
                        
                            Select Case Cells(row, "BO").Value
                                Case "1" 'Original Claim Submission
                                
                                 ClmPart2 = Join(Array(CLM, AMT, NTE, HI, SVCLOC, SVCADD, SVCADD2, _
                                 OTHSUB, OTHINS, OTHSUBNAME, OTHADD, OTHADD2, OTHPAYER, _
                                 LX, SVC, DTP, RENPROVNM), "")
                                 
                            Select Case Cells(row, "BO").Value
                                Case Else 'Claim Resubmission
                                
                                 ClmPart2 = Join(Array(CLM, RESUBREF, AMT, NTE, HI, SVCLOC, SVCADD, SVCADD2, _
                                 OTHSUB, OTHINS, OTHSUBNAME, OTHADD, OTHADD2, OTHPAYER, _
                                 LX, SVC, DTP, RENPROVNM), "")
                            End Select
                                 
                    End Select
                'Removed , LX2, SVC2, DTP2, LX3, SVC3, DTP3
                
             Case Else  'HERE IS WHERE MY 'CASE WITHOUT SELECT ERROR OCCURS

                ClmPart1 = Join(Array(HL1, BILLER, BILLERADD, BILLERADD2, BILLERTIN, _
                            HL2, SBRPLAN, SBRNAME, SBRADD, SBRADD2, SBRDMG, PAYRNAME), "")

                    Select Case Cells(row, "C").Value
                        Case "N"  'Subscriber is not the patient

                            Select Case Cells(row, "BO").Value
                                Case "1" 'Original Claim Submission

                                ClmPart2 = Join(Array(PTLOOP, CLM, AMT, NTE, HI, SVCLOC, SVCADD, SVCADD2, _
                                LX, SVC, DTP, RENPROVNM), "")

                            Select Case Cells(row, "BO").Value
                                Case Else 'Claim Resubmission

                                ClmPart2 = Join(Array(PTLOOP, CLM, RESUBREF, AMT, NTE, HI, SVCLOC, SVCADD, SVCADD2, _
                                LX, SVC, DTP, RENPROVNM), "")

                            End Select

                        Case Else  'Subscriber IS the patient

                            Select Case Cells(row, "BO").Value
                                Case "1" 'Original Claim Submission

                                 ClmPart2 = Join(Array(CLM, AMT, NTE, HI, SVCLOC, SVCADD, SVCADD2, _
                                 LX, SVC, DTP, RENPROVNM), "")

                             Select Case Cells(row, "BO").Value
                                Case Else 'Claim Resubmission

                                 ClmPart2 = Join(Array(CLM, RESUBREF, AMT, NTE, HI, SVCLOC, SVCADD, SVCADD2, _
                                 LX, SVC, DTP, RENPROVNM), "")

                             End Select
                                 
                    End Select
                    
               'Removed , LX2, SVC2, DTP2, LX3, SVC3, DTP3
             End Select
 

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

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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
Back
Top