ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula based on one cell, pased in another range (https://www.excelbanter.com/excel-programming/296891-formula-based-one-cell-pased-another-range.html)

Carrie[_3_]

Formula based on one cell, pased in another range
 
Hello

I am a novice in excel programming, so bear with me. I have figured out how to do most formulas (may be crude, but it works) where I select the cell (Range("B2").Select) and then I paste a function, in my Stats sheet, that is a sum over a 3-d reference (the other sheets in my workbook). My last two formulas of the Stats sheet are a sum and an average over the same 3-d range. I was able to get the first, using the above mentioned method, but how do I get the 3-d average over cells B105, but put this function in cell B108 of my Stats sheet? Recall that the cell B105 of the Stats sheet already has a function for the sum.

Thanks
Carrie

Tom Ogilvy

Formula based on one cell, pased in another range
 
Worksheets("Stats").Range("B108").Formula = "=Sheet1:Sheet10!$B$105"

change Sheet1:Sheet10 to reflect the names of the first and last sheet you
want to sum.

--
Regards,
Tom Ogilvy


"Carrie" wrote in message
...
Hello,

I am a novice in excel programming, so bear with me. I have figured out

how to do most formulas (may be crude, but it works) where I select the cell
(Range("B2").Select) and then I paste a function, in my Stats sheet, that is
a sum over a 3-d reference (the other sheets in my workbook). My last two
formulas of the Stats sheet are a sum and an average over the same 3-d
range. I was able to get the first, using the above mentioned method, but
how do I get the 3-d average over cells B105, but put this function in cell
B108 of my Stats sheet? Recall that the cell B105 of the Stats sheet
already has a function for the sum.

Thanks,
Carrie





All times are GMT +1. The time now is 12:32 AM.

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