Check value of cells against condition?

jgruberman

New Member
Joined
Jan 15, 2024
Messages
16
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hello,

I am looking to check a table of sports team names, times and ranking and if their ranking is 3 or lower and their game time is 9pm or later, to flag them somehow, perhaps with another cell with a yes/no or just any sort of identifier that the team fits the specified criteria. Here is an excerpt:

2/49:45 PMWarriors D1Bulldogs D1D1Valley Ranch StarCenterGreen15
2/43:30 PMGRITR D2Fighting Squids D2D2Valley Ranch StarCenterHitchcock54
 
i wonder if that is copying in the cell as a text value and not as a number
in which case try
=IF( AND( B2 >=timevalue("21:00:00"), H2*1<=3) , "Yes", "No")
OR
=IF( AND( B2 >=timevalue("21:00:00"), I2*1<=3) , "Yes", "No")

again just checked in goolge sheets as a TEXT value , which would be left justified and NOT right justified , as a number
I notice when copied here , regardless its left justified - so cannot tell on the forum, you may see in google sheets itself

so *1
or even +0
will change a text number to a real number
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
=IF( AND( B2 >=timevalue("21:00:00"), I2*1<=3) , "Yes", "No") --- did not seem to work. I removed the formula from the field and just put 3 in the cell and it still did not show Yes. Perhaps it's the timevalue not working correctly
 
Upvote 0
yep sounds like it maybe
try typing in 22:00
and see what happens
Maybe thats TEXT and not a real time
cant see how to format the cell on google sheets to show just general / number

EDIT OK, found it , on the menu bar
try foramtting as a number
should get 0.92 for 22:00
actually in formula bar
0.916666666666667
 
Upvote 0
I apologize, I assumed that if I wasn't posting in the Excel specific forum that it implied I was using Sheets. That was my mistake.
No, the forum is really a catch-all for ALL non-Excel type requests, not just for Google Sheets. So people will also post questions about Open Office, Outlook, etc (virtually any other program).
So we ask that you just mention somewhere in your thread title and/or original post that this question pertains to "Google Sheets".

Thanks
 
Upvote 0
yep sounds like it maybe
try typing in 22:00
and see what happens
Maybe thats TEXT and not a real time
cant see how to format the cell on google sheets to show just general / number

EDIT OK, found it , on the menu bar
try foramtting as a number
should get 0.92 for 22:00
actually in formula bar
0.916666666666667
I made it even simpler for troubleshooting and changed the time to a number of "10" and made the formula this:
=IF( AND( D2 >=10, K2<=3) , "Yes", "No")

so even though D2 is 10 and K2 is 3, it is still returning "No"
 
Upvote 0
I was able to figure this out. The original formula was correct that you posted, I was editing the cell values for the wrong cell. This is the working formula(which is your original reply I believ):
=IF(AND(D19>=TIMEVALUE("21:00"),K19<=3),"Yes","No")

Thank you for your assistance
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,260
Members
449,149
Latest member
mwdbActuary

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