Android Question Newbie question to save some space

i am not a programmer,in fact i am a firefighter and i have made some apps with b4a tutorials and examples THANK YOU B4A!!
I have the below code to calculate area with location.The code works but i would like to save some space but i never learned "for i" and i am pretty sure there a way to save 43000 characters on 400 rows and fix the 34 points limitation
Any help would be greatly appreciated

B4X:
If NumberOfRows = 0 Then
        ToastMessageShow("3 σημεια και πανω ",True)
    End If
    If NumberOfRows = 1 Then
        ToastMessageShow("3 σημεια και πανω ",True)
    End If
    If NumberOfRows = 2 Then
        ToastMessageShow("3 σημεια και πανω ",True)
    End If
    If NumberOfRows = 3 Then
      

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(0, 2) -  GetCell(2, 2) * GetCell(0, 1))
      
        lastArea
      
    End If

    If NumberOfRows = 4 Then


        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(0, 2) -  GetCell(3, 2) * GetCell(0, 1))
        lastArea
      


    End If

    If NumberOfRows = 5 Then


        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(0, 2) -  GetCell(4, 2) * GetCell(0, 1))
      
          
  

        lastArea
      

    End If

    '''''''''''''''''''''''''''''''''
    If NumberOfRows = 6 Then


        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1))+ (GetCell(5, 1) * GetCell(0, 2) -  GetCell(5, 2) * GetCell(0, 1))
      
          
      
        lastArea
      

    End If

    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 7 Then


        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(0, 2) -  GetCell(6, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If

    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 8 Then


        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(0, 2) -  GetCell(7, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If

    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 9 Then


        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(0, 2) -  GetCell(8, 2) * GetCell(0, 1))
      
          
        lastArea
      

    End If

    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 10 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(0, 2) -  GetCell(9, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If

    ''''''''''''''''''''''''''''''''''''''''
  
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 11 Then


        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(0, 2) -  GetCell(10, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If

    ''''''''''''''''''''''''''''''''''''''''
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 12 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(0, 2) -  GetCell(11, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 13 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(0, 2) -  GetCell(12, 2) * GetCell(0, 1))
      
          
      
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 14 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(0, 2) -  GetCell(13, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 15 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(0, 2) -  GetCell(14, 2) * GetCell(0, 1))
      
          
  
        lastArea
              

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 16 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(0, 2) -  GetCell(15, 2) * GetCell(0, 1))
      
          
      
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 17 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(0, 2) -  GetCell(16, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 18 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(0, 2) -  GetCell(17, 2) * GetCell(0, 1))
      
          
      
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 19 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(0, 2) -  GetCell(18, 2) * GetCell(0, 1))
      

        lastArea
              

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 20 Then
  
        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(0, 2) -  GetCell(19, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 21 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(0, 2) -  GetCell(20, 2) * GetCell(0, 1))
      
      
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 22 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(0, 2) -  GetCell(21, 2) * GetCell(0, 1))
      
          
      
        lastArea
              

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 23 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(0, 2) -  GetCell(22, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 24 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(23, 2) -  GetCell(22, 2) * GetCell(23, 1)) + (GetCell(23, 1) * GetCell(0, 2) -  GetCell(23, 2) * GetCell(0, 1))
      
          
      
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 25 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(23, 2) -  GetCell(22, 2) * GetCell(23, 1)) + (GetCell(23, 1) * GetCell(24, 2) -  GetCell(23, 2) * GetCell(24, 1)) + (GetCell(24, 1) * GetCell(25, 2) -  GetCell(24, 2) * GetCell(25, 1)) + (GetCell(25, 1) * GetCell(0, 2) -  GetCell(25, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 27 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(23, 2) -  GetCell(22, 2) * GetCell(23, 1)) + (GetCell(23, 1) * GetCell(24, 2) -  GetCell(23, 2) * GetCell(24, 1)) + (GetCell(24, 1) * GetCell(25, 2) -  GetCell(24, 2) * GetCell(25, 1)) + (GetCell(25, 1) * GetCell(26, 2) -  GetCell(25, 2) * GetCell(26, 1))+ (GetCell(26, 1) * GetCell(0, 2) -  GetCell(26, 2) * GetCell(0, 1))
      
          
      
        lastArea
              

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 28 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(23, 2) -  GetCell(22, 2) * GetCell(23, 1)) + (GetCell(23, 1) * GetCell(24, 2) -  GetCell(23, 2) * GetCell(24, 1)) + (GetCell(24, 1) * GetCell(25, 2) -  GetCell(24, 2) * GetCell(25, 1)) + (GetCell(25, 1) * GetCell(26, 2) -  GetCell(25, 2) * GetCell(26, 1))+ (GetCell(26, 1) * GetCell(27, 2) -  GetCell(26, 2) * GetCell(27, 1))+ (GetCell(27, 1) * GetCell(0, 2) -  GetCell(27, 2) * GetCell(0, 1))
      
          
  
        lastArea
              

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 29 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(23, 2) -  GetCell(22, 2) * GetCell(23, 1)) + (GetCell(23, 1) * GetCell(24, 2) -  GetCell(23, 2) * GetCell(24, 1)) + (GetCell(24, 1) * GetCell(25, 2) -  GetCell(24, 2) * GetCell(25, 1)) + (GetCell(25, 1) * GetCell(26, 2) -  GetCell(25, 2) * GetCell(26, 1)) + (GetCell(26, 1) * GetCell(27, 2) -  GetCell(26, 2) * GetCell(27, 1)) + (GetCell(27, 1) * GetCell(28, 2) -  GetCell(27, 2) * GetCell(28, 1)) + (GetCell(28, 1) * GetCell(0, 2) -  GetCell(28, 2) * GetCell(0, 1))
      
          
  
        lastArea
              

    End If
    ''''''''''''''''''''''''''''''''''''''''
  
    If NumberOfRows = 30 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(23, 2) -  GetCell(22, 2) * GetCell(23, 1)) + (GetCell(23, 1) * GetCell(24, 2) -  GetCell(23, 2) * GetCell(24, 1)) + (GetCell(24, 1) * GetCell(25, 2) -  GetCell(24, 2) * GetCell(25, 1)) + (GetCell(25, 1) * GetCell(26, 2) -  GetCell(25, 2) * GetCell(26, 1)) + (GetCell(26, 1) * GetCell(27, 2) -  GetCell(26, 2) * GetCell(27, 1)) + (GetCell(27, 1) * GetCell(28, 2) -  GetCell(27, 2) * GetCell(28, 1)) + (GetCell(28, 1) * GetCell(29, 2) -  GetCell(28, 2) * GetCell(29, 1)) + (GetCell(29, 1) * GetCell(0, 2) -  GetCell(29, 2) * GetCell(0, 1))
      
          
      
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 31 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(23, 2) -  GetCell(22, 2) * GetCell(23, 1)) + (GetCell(23, 1) * GetCell(24, 2) -  GetCell(23, 2) * GetCell(24, 1)) + (GetCell(24, 1) * GetCell(25, 2) -  GetCell(24, 2) * GetCell(25, 1)) + (GetCell(25, 1) * GetCell(26, 2) -  GetCell(25, 2) * GetCell(26, 1)) + (GetCell(26, 1) * GetCell(27, 2) -  GetCell(26, 2) * GetCell(27, 1)) + (GetCell(27, 1) * GetCell(28, 2) -  GetCell(27, 2) * GetCell(28, 1)) + (GetCell(28, 1) * GetCell(29, 2) -  GetCell(28, 2) * GetCell(29, 1)) + (GetCell(29, 1) * GetCell(30, 2) -  GetCell(29, 2) * GetCell(30, 1)) + (GetCell(30, 1) * GetCell(0, 2) -  GetCell(30, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
  
    If NumberOfRows = 32 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(23, 2) -  GetCell(22, 2) * GetCell(23, 1)) + (GetCell(23, 1) * GetCell(24, 2) -  GetCell(23, 2) * GetCell(24, 1)) + (GetCell(24, 1) * GetCell(25, 2) -  GetCell(24, 2) * GetCell(25, 1)) + (GetCell(25, 1) * GetCell(26, 2) -  GetCell(25, 2) * GetCell(26, 1)) + (GetCell(26, 1) * GetCell(27, 2) -  GetCell(26, 2) * GetCell(27, 1)) + (GetCell(27, 1) * GetCell(28, 2) -  GetCell(27, 2) * GetCell(28, 1)) + (GetCell(28, 1) * GetCell(29, 2) -  GetCell(28, 2) * GetCell(29, 1)) + (GetCell(29, 1) * GetCell(30, 2) -  GetCell(29, 2) * GetCell(30, 1)) + (GetCell(30, 1) * GetCell(31, 2) -  GetCell(30, 2) * GetCell(31, 1))+ (GetCell(31, 1) * GetCell(0, 2) -  GetCell(31, 2) * GetCell(0, 1))
      
          
      
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 33 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(23, 2) -  GetCell(22, 2) * GetCell(23, 1)) + (GetCell(23, 1) * GetCell(24, 2) -  GetCell(23, 2) * GetCell(24, 1)) + (GetCell(24, 1) * GetCell(25, 2) -  GetCell(24, 2) * GetCell(25, 1)) + (GetCell(25, 1) * GetCell(26, 2) -  GetCell(25, 2) * GetCell(26, 1)) + (GetCell(26, 1) * GetCell(27, 2) -  GetCell(26, 2) * GetCell(27, 1)) + (GetCell(27, 1) * GetCell(28, 2) -  GetCell(27, 2) * GetCell(28, 1)) + (GetCell(28, 1) * GetCell(29, 2) -  GetCell(28, 2) * GetCell(29, 1)) + (GetCell(29, 1) * GetCell(30, 2) -  GetCell(29, 2) * GetCell(30, 1)) + (GetCell(30, 1) * GetCell(31, 2) -  GetCell(30, 2) * GetCell(31, 1))+ (GetCell(31, 1) * GetCell(32, 2) -  GetCell(31, 2) * GetCell(32, 1)) + (GetCell(32, 1) * GetCell(0, 2) -  GetCell(32, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''
    If NumberOfRows = 34 Then

        area.text =  (GetCell(0, 1) * GetCell(1, 2) - GetCell(0, 2) * GetCell(1, 1)) + (GetCell(1, 1) * GetCell(2, 2) -  GetCell(1, 2) *  GetCell(2, 1)) + ( GetCell(2, 1) * GetCell(3, 2) -  GetCell(2, 2) * GetCell(3, 1)) + (GetCell(3, 1) * GetCell(4, 2) -  GetCell(3, 2) * GetCell(4, 1)) + (GetCell(4, 1) * GetCell(5, 2) -  GetCell(4, 2) * GetCell(5, 1)) + (GetCell(5, 1) * GetCell(6, 2) -  GetCell(5, 2) * GetCell(6, 1)) + (GetCell(6, 1) * GetCell(7, 2) -  GetCell(6, 2) * GetCell(7, 1)) + (GetCell(7, 1) * GetCell(8, 2) -  GetCell(7, 2) * GetCell(8, 1)) + (GetCell(8, 1) * GetCell(9, 2) -  GetCell(8, 2) * GetCell(9, 1)) + (GetCell(9, 1) * GetCell(10, 2) -  GetCell(9, 2) * GetCell(10, 1)) + (GetCell(10, 1) * GetCell(11, 2) -  GetCell(10, 2) * GetCell(11, 1)) + (GetCell(11, 1) * GetCell(12, 2) -  GetCell(11, 2) * GetCell(12, 1))+ (GetCell(12, 1) * GetCell(13, 2) -  GetCell(12, 2) * GetCell(13, 1)) + (GetCell(13, 1) * GetCell(14, 2) -  GetCell(13, 2) * GetCell(14, 1)) + (GetCell(14, 1) * GetCell(15, 2) -  GetCell(14, 2) * GetCell(15, 1)) + (GetCell(15, 1) * GetCell(16, 2) -  GetCell(15, 2) * GetCell(16, 1))   + (GetCell(16, 1) * GetCell(17, 2) -  GetCell(16, 2) * GetCell(17, 1))  + (GetCell(17, 1) * GetCell(18, 2) -  GetCell(17, 2) * GetCell(18, 1)) + (GetCell(18, 1) * GetCell(19, 2) -  GetCell(18, 2) * GetCell(19, 1)) + (GetCell(19, 1) * GetCell(20, 2) -  GetCell(19, 2) * GetCell(20, 1)) + (GetCell(20, 1) * GetCell(21, 2) -  GetCell(20, 2) * GetCell(21, 1)) + (GetCell(21, 1) * GetCell(22, 2) -  GetCell(21, 2) * GetCell(22, 1)) + (GetCell(22, 1) * GetCell(23, 2) -  GetCell(22, 2) * GetCell(23, 1)) + (GetCell(23, 1) * GetCell(24, 2) -  GetCell(23, 2) * GetCell(24, 1)) + (GetCell(24, 1) * GetCell(25, 2) -  GetCell(24, 2) * GetCell(25, 1)) + (GetCell(25, 1) * GetCell(26, 2) -  GetCell(25, 2) * GetCell(26, 1)) + (GetCell(26, 1) * GetCell(27, 2) -  GetCell(26, 2) * GetCell(27, 1)) + (GetCell(27, 1) * GetCell(28, 2) -  GetCell(27, 2) * GetCell(28, 1)) + (GetCell(28, 1) * GetCell(29, 2) -  GetCell(28, 2) * GetCell(29, 1)) + (GetCell(29, 1) * GetCell(30, 2) -  GetCell(29, 2) * GetCell(30, 1)) + (GetCell(30, 1) * GetCell(31, 2) -  GetCell(30, 2) * GetCell(31, 1))+ (GetCell(31, 1) * GetCell(32, 2) -  GetCell(31, 2) * GetCell(32, 1)) + (GetCell(32, 1) * GetCell(33, 2) -  GetCell(32, 2) * GetCell(33, 1)) + (GetCell(33, 1) * GetCell(0, 2) -  GetCell(33, 2) * GetCell(0, 1))
      
          
  
        lastArea
      

    End If
    ''''''''''''''''''''''''''''''''''''''''

Else
      
        ToastMessageShow("3 σημεία και πάνω",True)
    End If
End Sub
 
Last edited:

walt61

Active Member
Licensed User
Longtime User
I think you're looking for something like this, Dimitris:
B4X:
    Dim result As Double ' Change type 'Double' to whatever is needed

    If NumberOfRows < 3 Then
        ToastMessageShow("3 σημεια και πανω ",True)
    Else If NumberOfRows < 35 Then
        result = 0
        For i = 0 To (NumberOfRows - 1)
            If i < NumberOfRows - 1 Then
                result = result + (GetCell(i, 1) * GetCell(i, 2) - GetCell(i, 2) * GetCell(i, 1))
            Else
                result = result + (GetCell(i, 1) * GetCell(0, 2) - GetCell(i, 2) * GetCell(0, 1))
            End If
        Next
        area.Text = result
        lastarea
    Else
        ToastMessageShow("3 σημεία και πάνω",True)
    End If
 
Upvote 0

teddybear

Well-Known Member
Licensed User
it looks like you are using Gauss's area formula to calculate a polygon area, is it? what is the GetCell, is it used to get the x or y coordinate of a specified point on the polygon?
 
Upvote 0

walt61

Active Member
Licensed User
Longtime User
Thank you very much for your reply Walt61 ,but i am getting wrong results

Oops my bad, this should be better (notice the 'i + 1'):

B4X:
    Dim result As Double ' Change type 'Double' to whatever is needed

    If NumberOfRows < 3 Then
        ToastMessageShow("3 σημεια και πανω ",True)
    Else If NumberOfRows < 35 Then
        result = 0
        For i = 0 To (NumberOfRows - 1)
            If i < NumberOfRows - 1 Then
                result = result + (GetCell(i, 1) * GetCell(i + 1, 2) - GetCell(i, 2) * GetCell(i + 1, 1)) ' "i + 1" used here instead of 'i'
            Else
                result = result + (GetCell(i, 1) * GetCell(0, 2) - GetCell(i, 2) * GetCell(0, 1))
            End If
        Next
        area.Text = result
        lastarea
    Else
        ToastMessageShow("3 σημεία και πάνω",True)
    End If
 
Upvote 0

RichardN

Well-Known Member
Licensed User
Longtime User
@dimitris georgiadis

Here is a good tip.... If you thing you are writing too much code, then you probably are. There are many ways to process sequential information, using multiple If...Then statements is very labour intensive and good programmers are very lazy people!

Have a look at SELECT CASE. It can be much cleaner and far more useful.
 
Last edited:
Upvote 0
Oops my bad, this should be better (notice the 'i + 1'):

B4X:
    Dim result As Double ' Change type 'Double' to whatever is needed

    If NumberOfRows < 3 Then
        ToastMessageShow("3 σημεια και πανω ",True)
    Else If NumberOfRows < 35 Then
        result = 0
        For i = 0 To (NumberOfRows - 1)
            If i < NumberOfRows - 1 Then
                result = result + (GetCell(i, 1) * GetCell(i + 1, 2) - GetCell(i, 2) * GetCell(i + 1, 1)) ' "i + 1" used here instead of 'i'
            Else
                result = result + (GetCell(i, 1) * GetCell(0, 2) - GetCell(i, 2) * GetCell(0, 1))
            End If
        Next
        area.Text = result
        lastarea
    Else
        ToastMessageShow("3 σημεία και πάνω",True)
    End If
Thank you very much Walt61,that working perfect!!
 
Upvote 0
@dimitris georgiadis

Here is a good tip.... If you thing you are writing too much code, then you probably are. There are may ways ways to process sequential information, using multiple If...Then statements is very labour intensive and good programmers are very lazy people!

Have a look at SELECT CASE. It can be much cleaner and far more useful.
I am not a real programmer as I said so...if and Else is the only way
 
Upvote 0
Top