Hey guys,
Got hit with a large excel project at work (they saw I had Excel certification, but this is even past my knowledge) and found an answer to an earlier question here, so I signed up. Now, however, I have a new hurdle that I can't seem to figure out or find any information on that fits my application. My VBA knowledge is limited, so bear with me.
I currently have a macro created that is bringing raw data in from a back end source and running some formulas on it to get data we can use. My issue is that every day this data is coming in, it is a different amount. One day there might be 5 lines of data, and 200 the next. Once I have the data in and analyzed, which I have a macro successfully doing no matter how much data comes in, I need to subtotal how many lines came in, and then group them so they can be minimized and expanded when need be. Also, this is updated each day, so every time the macro is run it will be one line lower, because it is a new day. So everything needs to be completely relative.
I have the current VBA code of what needs done copied below, but that is for one example of one day of data. I need this process to work no matter how many lines of data come in. So my bottom line question is: Is there a way to make the subtotaling and grouping relative to how many lines of data come in?
Thanks a ton for the help, this is a past my excel knowledge but I need to get the project done for work.
Range("L38320").Select
ActiveCell.FormulaR1C1 = "=SUBTOTAL(3,R[1]C:R[16]C)"
Range("A38321:L38336").Select
Selection.Rows.Group
Range("F38340").Select
Bookmarks