So here is my dilemma,
I have a spreadsheet that has two different data sources (i.e., A and B). The amounts of these data sources (i.e., the number
of columns) varies from sheet to sheet. I have to calculate the averages of these data sources independently and together.
Because this data is spread across twenty or more spreadsheets, these calculations can be time-consuming. I want to do the
1. Locate the last occurrence of the first data source "A" in row and then insert a column after that cell.
2. In that cell, I want to get the average of each data source for each row of data (i.e., there are always 19 rows of data).
I want to do the same two steps for the second data source "B". Then, I want to insert a column after the "B" average and
this column will be used to get an average of each row of data from A and B together. Please keep in mind that the number of
data sources for A and B varies from sheet to sheet.
So far, I am working on code to try to "find" the text in a range (i.e., find the last instance of "A"), but I cannot figure
out how to get it to get it to stop at the last occurrence and then insert a column. I have some ideas about how to calculate
the average, but any of yours are much appreciated.
Also, the row with the type of data (i.e., A or B) is named because this function is part of a larger macro. Therefore, it is
relatively easy to get to it.
I have attached a version of the file that displays how I want it to look.
The code I have thus far is:
Cells.Find(What:=A, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
Any and all help is appreciated. If I should completely rethink my approach to getting these results, I am open to that