SUMIFS +vlookup and Month/Quarter to date

Status
Not open for further replies.

Giancar

Board Regular
Joined
Nov 29, 2017
Messages
52
Hi,

I have 2 tables in 2 sheets.

Sheet1
nameMargin MTDTarget MTDMargin QTDTarget QTD
James
Mark
Frank
Jim
Russell
Conrad
Denis

<tbody>
</tbody>

Sheet2
YearQuarterMonthDayNameMarginTarget
2018Q2May01-05-2018James1020
2018Q2May01-05-2018Mark2020
2018Q2May01-05-2018 Frank2515
2018Q2May01-05-2018 Jim3130
2018Q2May02-05-2018 James2322
2018Q2May02-05-2018 Mark418
2018Q2May02-05-2018 Frank10066
2018Q2May02-05-2018 Jim3241
2018Q2May02-05-2018Russell1140
2018Q2May02-05-2018Conrad2320
2018Q2May03-05-2018Mark67
2018Q2May03-05-2018Denis33
2018Q2June05-06-2018Mark20
2018Q2June05-06-2018Frank10
2018Q2June05-06-2018Jim4
2018Q2June05-06-2018James3

<tbody>
</tbody>

Result:
In B2 (Table Sheet1), I would like to have: sum column F (Table sheet2), <= Today date (dynamic), if column E (Table sheet2) is matching column A (Table sheet1) and it is the current month.
In C2 (table Sheet1), same per above, but sum of column G (Table sheet2)
In D2 (Table Sheet1), I would like to have: sum column F (Table sheet2), <= Today date (dynamic), if column E (Table sheet2) is matching column A (Table sheet1) and it is the current quarter or Q2.
In E2 (table Sheet1), same per above, but sum of column G (Table sheet2)

I tried to use helper column/cell but I am not able to find a solution by myself. Any help?

Thank you
 
Status
Not open for further replies.

Forum statistics

Threads
1,082,275
Messages
5,364,178
Members
400,785
Latest member
Mahar92

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top