# Formula to add cells based on criteria

1. ## Formula to add cells based on criteria

Hello:

I have monthly data as shown in Sheet1.
Pls refer to sheet2.
Depening on value in cell c1 (month #), i need formula in in cell D3 and D4 to add 3 months of data for items listed in column A.

I have shown manually entered result.

Let me know if you have any questions.
Thanks.
Riz

2. ## Re: Formula to add cells based on criteria

In D3 copied down:

=SUM(OFFSET(Sheet1!\$K5,0,0,MATCH(Sheet2!\$A\$3,Sheet1!\$J\$5:\$J\$6,0),C\$1))

4. ## Re: Formula to add cells based on criteria

A non-volatile alternative...

=SUM(Sheet1!K5:INDEX(Sheet1!K5:V5,,Sheet2!\$C\$1))

5. ## Re: Formula to add cells based on criteria

Hello Ali:

Thanks, its works great

Riz

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1