if statement referencing multiple cells

debbw

New Member
Joined
Feb 4, 2021
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hello - I am pretty sure the answer I'm looking for is here somewhere, but I'm not seeing it. Any help is greatly appreciated. I'm working on a softball pitching chart & trying to return results of balls (G5) & strikes (H5) where only one cell will have data. Specific text is "*H" for items in my dropdown list where the pitcher "hits" her spot (F5). So something like this:
Formula in Cell F5: IF G5 or H5 ="*H", return "Y" to cell F5, otherwise "" (leave blank or return "N").

I'm sure it's something simple - I keep getting "too many arguments," "FALSE," "VALUE," or "N" I'm attaching a screenshot that might be helpful.
Thank you in advance for any assistance you can provide.
Screenshot if stmt.png
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
11,845
Maybe:

Book1
FGHI
4Hit spot?BallStrikeResult
5YC2x (H)
6YC2x (H)
7 C2
Sheet8
Cell Formulas
RangeFormula
F5:F7F5=IF(COUNTIF(G5:H5,"*H)"),"Y","")


I had to use *H) in the formula, otherwise it wouldn't match the values you showed.
 

debbw

New Member
Joined
Feb 4, 2021
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Maybe:

Book1
FGHI
4Hit spot?BallStrikeResult
5YC2x (H)
6YC2x (H)
7 C2
Sheet8
Cell Formulas
RangeFormula
F5:F7F5=IF(COUNTIF(G5:H5,"*H)"),"Y","")


I had to use *H) in the formula, otherwise it wouldn't match the values you showed.
OMG! You’re amazing! That worked beautifully & thank you so much for the quick response
 

debbw

New Member
Joined
Feb 4, 2021
Messages
15
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Happy to help! Thanks for the feedback. 😎
Eric,
Hope you can help with another one, please... referring to colomn "H" above, I'm trying to get a count for first pitch strikes in Column E that has the # of pitches by pitcher to each batter (1, 2, 3, etc.) So, I want countif or sum if "1" is in E:E & data is in column H. I've tried a number of scenarios based on things I've seen in the posts, but I just can't get it right.
Thanks in advance,
Debbie
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
11,845
I'm a little unsure, since I don't know what your sheet really looks like, but maybe something like this:

Book1
EFGHI
11
2
3
4Hit spot?BallStrikeResult
51YC2x (H)
62YC2x (H)
73 C2
Sheet1
Cell Formulas
RangeFormula
F1F1=COUNTIFS(E5:E8,1,H5:H8,"?*")
F5:F7F5=IF(COUNTIF(G5:H5,"*H)"),"Y","")
 
Solution

debbw

New Member
Joined
Feb 4, 2021
Messages
15
Office Version
  1. 365
Platform
  1. Windows
I'm a little unsure, since I don't know what your sheet really looks like, but maybe something like this:

Book1
EFGHI
11
2
3
4Hit spot?BallStrikeResult
51YC2x (H)
62YC2x (H)
73 C2
Sheet1
Cell Formulas
RangeFormula
F1F1=COUNTIFS(E5:E8,1,H5:H8,"?*")
F5:F7F5=IF(COUNTIF(G5:H5,"*H)"),"Y","")
You're a ROCK STAR! Thank you so much!
What do you recommend I do if I have more hurdles & can't find answers? Should I "follow" you or post new requests?
Debbie
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
11,845
You should probably open a new thread. There are a lot of talented people here who can help you. I was just the lucky one who got to your question first! 🤩 So if I happen to be away for a few days, you would get a quicker answer. If you post a question and don't get an acceptable answer, you can tag me in a post (with an @ sign and my user name, like this @debbw ) and I'll take a look if I'm available.

I'm glad to have helped! 😎
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,110
Messages
5,768,153
Members
425,458
Latest member
Jaspal1996

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
Top