Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Average: 2nd argument as a variable in another cell av(c6:c(a3)) | Excel Discussion (Misc queries) | |||
Function (array argument, range argument, string argument) vba | Excel Programming | |||
Variable as argument in filter range | Excel Programming | |||
type variable as argument of a sub | Excel Programming | |||
passing a variable as an argument to a function | Excel Programming |