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
 

Some videos you may like

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

nunami9

New Member
Joined
Nov 7, 2013
Messages
6
I figured out the problem...silly really, I entered Select Case for each case option :LOL::LOL:
 

Watch MrExcel Video

Forum statistics

Threads
1,108,971
Messages
5,525,967
Members
409,673
Latest member
Riseee

This Week's Hot Topics

Top