• Row number of last non-blank cell (2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Row number of last non-blank cell (2000)

    • This topic has 2 replies, 2 voices, and was last updated 22 years ago.
    Author
    Topic
    #388433

    OK, I know I am going to catch it here…brain is on vacation temporarily…

    With below, how do I find the row number of the last non-blank cell i.e. the row number of the last cell in range c48:c67 that is not blank?

    For b = 1 To Range("c48:c67").End(xlDown).Row
    
    Viewing 1 reply thread
    Author
    Replies
    • #681887

      Never mind, I got it. I was trying to add the non-blank cells in a range to a right click popup menu bar and instead of doing all that, this is what I did…

      End With
      With CommandBars(“RCShifts”).Controls(3)
      .Caption = “Early”
      For Each cell In Range(“c48:c67”)
      If cell.Value “” Then
      b = b + 1
      .Controls.Add Type:=msoControlButton
      With CommandBars(“RCShifts”).Controls(3).Controls(
      .Caption = cell.Value
      .OnAction = “EntShifts”
      End With
      End If
      Next
      End With
      b = 1

    • #682163

      Try:

      For b = 1 To Range("C67").End(xlUp).Row
      
    Viewing 1 reply thread
    Reply To: Row number of last non-blank cell (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: