Vlookup? Combined with IF? Combined with date restrictions... Halp!

Aimee S.

Board Regular
Joined
Sep 28, 2010
Messages
236
Office Version
  1. 365
Platform
  1. Windows
How would this look?

I need a formula that looks at Column L for the value of 1, and if there is a value of 1 in Column L, count all occurences of the word "Base" in Column C..... *IF* the date in Column R is between two dates, for example, 3/1/11 and 3/31/11.

Using that same logic I need the same formula but with the change to the *IF* statement. ... If the date in Column R is any date that falls within the current calendar month (adjusts based on what month the current day falls in).

And lastly using that same logic I need the same formula where the if statement is ... If the date in Column R is earlier say than a given date of 5/1/11.

How's that for a tricky question?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
You can use a formula like this:

=SUMPRODUCT(--(L1:L10=1),--(C1:C10="base"),--(R1:R10>=DATE(2011,3,1)),--(R1:R10<=DATE(2011,3,31)))

Expand the ranges to suit, but make sure that they all have the same number of rows and avoid using entire columns.
 
Upvote 0
OO neat!!!!

So any idea what the formulaic language would be so that instead of

--(R1:R10<=DATE(2011,3,31)))

it would pull any date in the present month? I know the formula for the present *day* is =TODAY() ....
 
Upvote 0
How about?

=SUMPRODUCT(--(L1:L10=1),--(C1:C10="base"),--(MONTH(R1:R10)=MONTH(TODAY())),--(YEAR(R1:R10)=YEAR(TODAY())))
 
Upvote 0
Sadly it returns a #VALUE! error.

The first one works though!

You're so close!!! You can doooo it! hehe ^_^

Maybe it needs something to address the DAY in that it should be between >=1 and <=31?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,282
Members
452,902
Latest member
Knuddeluff

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