I need help writing an if/then statement.
A certain row, for example, let’s use row 3, will have a "C" in it, which will move from month to month, but will never be in the same column twice.
Ultimately, this is what I want the formula to calculate. Let's use K5 as the cell where I would be entering this formula. Detect the cell in L3:AF3 which equal "C" then multiple that cell in row 5 by G5. (For example, if "C" was in Q3, the K5=Q5*G5). How would this formula/if--then statement be written?
Thanks for the help!
Last edited by mchekmareva; 09-19-2011 at 07:09 PM.
It's a little tricky to work out quite what you're after, but I think in K5 you'd want ...
=G5 * OFFSET(K5,0,MATCH("C",K3:AF3,0)-1)
Just realised that's going to give you a circular reference warning, because K5 is both the cell containing the formula and, possibly, the cell containing the value to be multipled by G5. That formula would work fine in, say, J5 though.
Last edited by Andrew-R; 09-19-2011 at 06:57 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks