ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Setting original Formulas for copying (https://www.excelbanter.com/excel-discussion-misc-queries/101366-setting-original-formulas-copying.html)

Jim May

Setting original Formulas for copying
 
I have two sets of data on a single worksheet, as so;
Short example - actual LeftData = Rows 4-601 RightData = Rows 4-823
RightData is more comphrehensive than LeftData


LeftData RightData
ColA ColB ColC ColD Col E Col F Col G
Row XYZ XYZ
4 1 Avg Charges 65760.37 1 Avg Charges 45,511 65,760
5 Count of XYZ 2 Count of XYZ 10 2
6 3 Avg Charges 31309.41 2 Avg Charges 29,073 0
7 Count of XYZ 3 Count of XYZ 8 0
8 7 Avg Charges 44233.39 3 Avg Charges 48,608 31,309
9 Count of XYX 2 Count XYZ 6 3

Formula for G4 (at present is):
=IF(ISNA(INDEX($A$4:$C$601,MATCH(D4,$A$4:$A$600,0) ,3)),0,INDEX($A$4:$C$601,MATCH(D4,$A$4:$C$600,0),3 ))
<< which produces the 65,760 (Cell C4).

Formula for G5 (at present is):
=IF(ISNA(INDEX($A$4:$C$601,MATCH(D4,$A$4:$C$600,0) +1,3)),0,INDEX($A$4:$C$601,MATCH(D4,$A$4:$C$600,0) +1,3))

These above two work - so I've copied them (G4:G5) to (G6:G7);
Then copied G4:G7 to G8:G11; then copied G4:G11 to G12:G19
Copying the Blocks 2,4,8,16,32,64,128, etc.. fashion...
So my entire spreadsheet formulas in G4:G601 work fine,
It is just the step-copying I had to do that "bothers" me.
Could I have done this a different way (simplier???)
If so, HOW?

Thanks in Advance..




All times are GMT +1. The time now is 04:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com