If it's the right date and IF a cell contains a certain string.....but doesn't also contain a different certain string.

SandsB

Well-known Member
Joined
Feb 13, 2007
Messages
731
Office Version
  1. 365
Platform
  1. Windows
A few days ago, I asked....
Two sheets in my file.

Sheet 1 has a date in column B and the free form text in column A may or may not contain the string #EOB.
Sheet 2 is where I want to count this stuff. Column A is the date and column B is where I need a formula to look at Sheet 1, look at only the rows where the date in column B (could be several hundred records with the same date) is the same as the date in Sheet 2 column A and give me the count of how many of those records have #EOB somewhere in column A. So.... a COUNTIF with a date match of some sort?

Sheet 1 sample
Gibberish, 7/1/23
Gibberish #EOB, 7/1/23
Gibberish, 7/1/23
Gibberish #EOB More Gibberish #EOR, 7/1/23
Gibberish, 7/1/23
Gibberish, 7/2/23
Gibberish #EOB, 7/3/23
Gibberish, 7/3/23

Sheet 2 result
7/1/23, 2
7/2/23, 0
7/2/23, 1

awoohaw gave me the fix here....

Turns out the powers that be now want me to exclude some of the results. So how can I return the same answers awoohaw's beautiful formula returns unless the record that contains #EOB ALSO contains #EOR?
Sheet 2 new result
7/1/23, 1
7/2/23, 0
7/2/23, 1
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Thanks for the kudos SandsB, but there are others here way more savvy with excel than me. I am pleased you can get answers from anyone here:
try this:

Book2
FGH
1Sheet 1 sample
2Gibberish2023-07-01
3Gibberish #EOB2023-07-01
4Gibberish2023-07-01
5Gibberish #EOB More Gibberish #EOR2023-07-01
6Gibberish2023-07-01
7Gibberish2023-07-02
8Gibberish #EOB2023-07-03
9Gibberish2023-07-03
10
11Sheet 2 result
122023-07-0121.00
132023-07-0200.00
142023-07-0210.00
Sheet1
Cell Formulas
RangeFormula
H12:H14H12=SUM(ISNUMBER(FIND("#EOB",$F$2:$F$9))*ISNUMBER(FIND("#EOR",$F$2:$F$9))*(F12=$G$2:$G$9))
 
Upvote 0
More savvy? Over the years, I've learned a lot of very useful Excel tips, lightened the workload at work and even become (I can't believe this myself) the office Excel guru because of the generosity of people like you. Thank you.
 
Upvote 0
More savvy? Over the years, I've learned a lot of very useful Excel tips, lightened the workload at work and even become (I can't believe this myself) the office Excel guru because of the generosity of people like you. Thank you.
one of my favorite quotes (from a movie).... "Despise not the labor which humbles the heart. Humility has saved kingdoms the proud have all but led to ruin." I have been called a office guru often, and am happy to have that esteem. --- But I am well aware that there are folks so much more expert than me. i do not consider myself an expert at all.. but a pretty good hack.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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