Countif Function Multiple Criteria

Angelfish13

New Member
Joined
Jan 25, 2017
Messages
14
Hi,

I need to find a COUNTIF (or something similar) formula. Right now I do this by hand and it takes absolutely forever. Please see below. Is there any way to achieve this with a formula? Thanks so much!

I need to create a COUNTIF function that does the following (in sheet 1 column 2):
1. Finds a "fuzzy match" between two names on two different sheets
2. If there is a match AND the last pick-up date is within the current month, it counts it

In another column, I also need it to the following (in sheet 1 column 3):
1. Finds a "fuzzy match" between two names on two different sheets
2. Finds the latest pick-up date for that name and reflects what this date is


Example Sheet 1 (where I slowly fill in column 2 and 3 by hand)
Name# of pick-ups this month Last pick-up date
Bob Smith211/3
Fred George111/2
Sam Kern010/25
Patrick Jay010/21

<tbody>
</tbody>

Sheet 2 (master data sheet - the sheet I reference to fill out sheet 1 by hand)
NamePick-up date
Smith, Bob (REP)11/3
Bob Smith11/2
George, Fred11/2
Kern, Sam (REP)10/25
Kern, Sam (REP)10/21
Jay, Patrick 10/21

<tbody>
</tbody>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
In B2 of Sheet1 control+shift+enter, not just enter, and copy down:

=SUM((IF(ISNUMBER(SEARCH(REPLACE(A2,1,SEARCH(" ",A2),""),Sheet2!$A$2:$A$7)),Sheet2!$B$2:$B$7-DAY(Sheet2!$B$2:$B$7)+1)=TODAY()-DAY(TODAY())+1)+0)

In C2 of Sheet1 control+shift+enter, and copy down:

=MAX(IF(ISNUMBER(SEARCH(REPLACE(A2,1,SEARCH(" ",A2),""),Sheet2!$A$2:$A$7)),Sheet2!$B$2:$B$7))

Hope the fuzzy matching the above set up implements will suffice.
 
Upvote 0

Forum statistics

Threads
1,215,701
Messages
6,126,297
Members
449,308
Latest member
VerifiedBleachersAttendee

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