Using a VLOOKUP result as criteria in a COUNTIF/S formula

willjansen

New Member
Joined
Sep 10, 2017
Messages
1
Hi there, long time reader, first time poster.

I've been searching all morning for an answer and haven't had much success.

I'd like to shorten the below formula by using the vlookup result as the criteria in the countif/s formulas. The idea (apart from shorten the formula) is to add additional criteria into the "vlookup result" rather than in the countif/s formula. Using a reference cell instead of the vlookup doesn't help either.

= IF(
AND(
$D$9 = "",
$D$10 = ""
),
COUNTIF(
Table1[Enquiry_Source__c],
{ "Agent Referral",
"Builder Referral",
"Builder Referral Program",
"Developer Referral",
"Staff Referral"
}
),
COUNTIFS(
Table1[Enquiry_Source__c],
{ "Agent Referral",
"Builder Referral",
"Builder Referral Program",
"Developer Referral",
"Staff Referral"
},
Table1[Start of Month],
">=" & Report!$D$9,
Table1[End of Month],
"<=" & Report!$D$10
)
)

I've tried the below but get a '0' as the result.

=IF(
AND(
$D$9 = "",
$D$10 = ""
),
COUNTIF(
Table1[Enquiry_Source__c],
VLOOKUP(
I13,
Processing!$G$1:$H$7,
2,
FALSE
)
),
COUNTIFS(
Table1[Enquiry_Source__c],
VLOOKUP(
I13,
Processing!$G$1:$H$7,
2,
FALSE
),
Table1[Start of Month],
">=" & Report!$D$9,
Table1[End of Month],
"<=" & Report!$D$10
)
)

Any suggestions will be appreciated.

Regards,
Will.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Perhaps if you can provide a small data sample and the results you want. This could help others provide perhaps a more efficient formula for what you need.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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