Quantcast
Channel: Active questions tagged worksheet-function - Super User
Viewing all articles
Browse latest Browse all 934

How can I apply a formula to specify which cells I want to use?

$
0
0

I have a template document where I will want to grab cell values from different spacings depending on another value. Call it myValue which lives in myValueCell.

Say myValue is 1. Then I want to take an average of every cell for 3 cells: B1, B2, B3.But if myValue is 2, then I want to take the avg of every other cell for 3 cells: B2, 4, 6.

So my question is: How to I properly write a formula that does this? I'm thinking something along the lines of =AVERAGE(B&[(1:3)*myValueCell]).


Viewing all articles
Browse latest Browse all 934

Trending Articles