Complex nestig of match, sumif, vlookup, hlookup?

notanexcelguy

New Member
Joined
Jul 15, 2011
Messages
2
I have a spreadsheet and I need to write a formula to do a couple things.
1. Search a range of cells on a separate sheet, same workbook, and find the columns with headers rows within a specific month
2. Once the correct columns are found, then I need it to look at the values below.
3. For each value in the correct column I need it to look horizontally to find a second value
4. If the second value is not found, I want it to disregard
5. If the second value is found I want to add up all the values where the second value is found

I am new to writing this type of formula and could really use some help here.

Thanks in advance
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
The formula needed relies heavily on the layout of your data. Could you show some examples of what you have and what you want?
 
Upvote 0
Column B Column E Column F Column G Column H Column I Column J Column K
Name 7/8 7/15 7/22 7/29 8/5 8/19 8/26
Not2ndValue 40 40 40 40 40 40 40
2nd Value 40 40 40 40 40 40 40
Not2ndValue 40 40 40 40 40 40 40
2nd Value 40 40 40 40 40 40 40

So I want:
1. Search for all columns with dates w/in the month of July
2. Look at each value in the columns from Step 1, and find the values that have the "2nd Value" in the same row
3. Once all the values w/2nd Value are located, sum the values from the columns in July

Desired Formula Result from this table: 320

Unfortunately, I am building inside of someone else sheet full of macros and I cannot change the layout.
 
Upvote 0
I don't have excel at hand right now but try something like this:
=sumproduct(month(B2:K2)=7,B4:K4,B6:K6)

Probably confirmed with Ctrl+Shift+Enter instead of Enter.

I'm not exactly sure how to interpret your table since you only pasted the text. Try using Excel Jeanie to display tables on the forum: http://www.excel-jeanie-html.de/index.php?f=1
 
Upvote 0
I had spent some restless time thinking over this but could not find out a reliable formula. I come here to learn things out of curiosity (have very limited scope to apply @ work but I do it wherever it is possible).

You guys are great!

This is my image :bow:
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,726
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top