vlookup with a range result

T

tk

Here is my layout:

Cell d4 is the day of month manually entered
In columns DN2 through ER2 I have 1 - 31 for 31 days in the month
I have revenue numbers in DN4 through ER4
I want to match what I put in D4 for day of month with the day in row 2 (DN
to ER) and return a month to date value.

So if today is the 10th I would put 10 in D4. I want to return a value for
DN4:DW4.
If it were the 5th of the month I would put 5 in D4 and want the sum of
DN4:DR4.

Any suggestions?
 
T

T. Valko

Try this:

=SUM(DN4:INDEX(DN4:ER4,D4))

Note: if D4 is empty the entire range will be calculated.
 
D

driller

just guessing here
try
=sumproduct(--(d4=<DN2:ER2),--(DN4:ER4))
this may suit on whatever arrangement of Day# 1-31 DN2:ER2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top