I have a database of monthly statistics. I want to show a YTD number based on a cell value and vlookup specific data.
For example, in the attachment as I change B6 from 3 to 4, the value in B9 should change from 130000 to 172000.
I have a database of monthly statistics. I want to show a YTD number based on a cell value and vlookup specific data.
For example, in the attachment as I change B6 from 3 to 4, the value in B9 should change from 130000 to 172000.
Enter formula in B9 and copy down
=INDEX($B$2:$G$4,MATCH(A9,$A$2:$A$4,0),MATCH("Period "&B$6,$B$1:$G$1,0))
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
Unfortunately that just enters the value of that period, I am looking for a sum of the periods. So, if B6 = 3, it would return 130000 and if it was 4 it would return 172000.
copy down B9:B11![]()
=SUM(INDEX($B$2:$B$4,MATCH(A9,$A$2:$A$4,0)):INDEX(2:2,,$B$6+1))
Last edited by protonLeah; 09-30-2015 at 05:36 PM. Reason: in case it goes past column G
Ben Van Johnson
Or
and copy down
=SUM(INDEX((VLOOKUP(A9,$A2:$G2,{2,3,4},0)),0))
Thanks protonLeah. That works.
One more
=SUM(INDEX((--RIGHT(B$1:G$1)<=B$6)*(B2:G2),0))
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks