Dim Brand As String, Status As String, CaseNumber As String, CaseSummary As String
Worksheets("1st").Select
Brand = Range("B25", Range("B25").End(xlDown))
I am trying to run a macros where when I click on a command button, it will insert all data from column B starting on row 25 and go all the way down until it hits the first blank cell. Problem is that it keeps telling me to debug and points to the third line of code in the code above. I thought I am doing this correctly but looks like I am not.
How can this line of code be fixed so that it looks through all data from column B up until it hits the first blank row in that column?
I think you have a couple of problems:
Dim Brand As **Range**
set
keywork, like **set** Brand = Range...
Range
definition seems to be missing a Range
keyword: Range(Range("B25"), Range("B25").End(xlDown))So, altogether it might look like this:
Dim Brand As Range, Status As String, CaseNumber As String, CaseSummary As String
Worksheets("1st").Select
set Brand = Range(Range("B25"), Range("B25").End(xlDown))