J
jersiq
I have a spreadsheet where I am auto-filtering the data, creating new sheets
based on the filters, then graphing the results.
The row length of my data can be variable, and in my macro, I want to be
able to paste the variable length of the data to one of the new sheets.
For example, on the "raw data" page, I filter two criteria and copy the
column with data I need to another worksheet.
Earlier in the macro I do define the row length, using an "IF" statement
combined with a "SUM" statement, and assign it to the variable row_count.
Now later in the macro, I would like to call that variable into my paste
function.
Selection.AutoFilter Field:=4, Criteria1:="1"
Selection.AutoFilter Field:=3, Criteria1:="1"
Range("G2:G(I WANT MY VARIABLE HERE)").Select
The above of course, gives me errors.
Now later in the macro, which I haven't written yet, I will also need to
call this variable, as it will determine the source data for a chart plotted
over time.
Is the way I am attempting this going to cause problems with the chart in
the fuiture?
based on the filters, then graphing the results.
The row length of my data can be variable, and in my macro, I want to be
able to paste the variable length of the data to one of the new sheets.
For example, on the "raw data" page, I filter two criteria and copy the
column with data I need to another worksheet.
Earlier in the macro I do define the row length, using an "IF" statement
combined with a "SUM" statement, and assign it to the variable row_count.
Now later in the macro, I would like to call that variable into my paste
function.
Selection.AutoFilter Field:=4, Criteria1:="1"
Selection.AutoFilter Field:=3, Criteria1:="1"
Range("G2:G(I WANT MY VARIABLE HERE)").Select
The above of course, gives me errors.
Now later in the macro, which I haven't written yet, I will also need to
call this variable, as it will determine the source data for a chart plotted
over time.
Is the way I am attempting this going to cause problems with the chart in
the fuiture?