Data Validation with Multiple Conditions

jmoore19023

New Member
Joined
Jun 12, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hey,

I'm pretty new to excel and am trying to figure out a way to force users to enter data under certain conditions. I have a form where they enter a number every hour. Based on what that number is, they may have to provide additional details.

Currently I have it to where they cannot skip the putting in the number for the previous hour using the custom selection in data validation and the formula given: =(COUNTIF(C6,"")=0). This goes down several rows checking each prior cell for a value ensuring that that user has entered some value.

Now where I'm getting hung up at is, I need the data validation to ensure that when a target is not met(which I have a cell that figures that), that a reason must be provided. Is this possible? And if so, how would I set the formula up in data validation so that both criterias are met.

1.) Data in above cell must not be "".
2.) If value in above cell does not meet target, a value must be present in cell K (and L if possible) before next hour's value can be entered.

Thanks in advance and sorry if I explained this poorly.

1718210731781.png
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Welcome to the forum. I'm not sure which cell you are wanting to put the validation in, so I used G7 with G6 as the example. Update the values as needed for your target criteria.
Excel Formula:
=AND(ABS(G6)>0,OR(AND(G6<-1000,K6<>"",L6<>""),G6>=-1000))

Use the above formula with the following settings:
1718213295783.png
 
Upvote 1
Solution
Welcome to the forum. I'm not sure which cell you are wanting to put the validation in, so I used G7 with G6 as the example. Update the values as needed for your target criteria.
Excel Formula:
=AND(ABS(G6)>0,OR(AND(G6<-1000,K6<>"",L6<>""),G6>=-1000))

Use the above formula with the following settings:
View attachment 112606
Hey Dreid,

Thank you for getting back to me. I'm going to play with what you provided and try to make it work.

Also here's the extra context that I forgot to add previously, just in case that may change anything.

C6 = Hourly Input
F6 = Value above/below target.

When a user enters a value in C7,

1.) C6 must have a value present. (FYI, there are cases where a 0 can be entered, although rare.)
2.) If F6 is negative(meaning they missed target), that means K6 & L6 must have values.

Thank you again! I think I can work with what you provided, but I'll reach out if I start to struggle again.
 
Upvote 0
Just a quick follow up, I already managed to change the formula to work exactly as I wanted.

Again, I appreciate the assistance. I spent alot of time googling and rubbing my temples trying to figure this out haha 😅
 
Upvote 0
Hey Dreid,

Thank you for getting back to me. I'm going to play with what you provided and try to make it work.

Also here's the extra context that I forgot to add previously, just in case that may change anything.

C6 = Hourly Input
F6 = Value above/below target.

When a user enters a value in C7,

1.) C6 must have a value present. (FYI, there are cases where a 0 can be entered, although rare.)
2.) If F6 is negative(meaning they missed target), that means K6 & L6 must have values.

Thank you again! I think I can work with what you provided, but I'll reach out if I start to struggle again.
Just a quick follow up, I already managed to change the formula to work exactly as I wanted.

Again, I appreciate the assistance. I spent alot of time googling and rubbing my temples trying to figure this out haha 😅
You're welcome, and glad you got it working.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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