?
Solved

Validation Rule (Formula)

Posted on 2013-06-11
6
Medium Priority
?
312 Views
Last Modified: 2013-06-12
Hello Experts,

I have a worksheet, that I need to control if the user should be entering a value into a cell.

See image...

example
The weight columns, are the ONLY columns the user is allowed to type but ONLY IF there is a pallet # to the left.

Is it possible to reject a weight, if there's no pallet listed?

Thank you in advance for your help!

~ Geekamo
0
Comment
Question by:Geekamo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 1600 total points
ID: 39239408
It looks like your data start in Row 5 or so.  So...

1) Select F5:F?????

2) Go to Data Validation, type Custom, using formula:

=COUNT($E5:$F5)=2

That will only allow entries in Col F if both Col E and Col F have numeric values.
0
 
LVL 22

Assisted Solution

by:Flyster
Flyster earned 400 total points
ID: 39239436
Click on cell F1. Go to the data tab - data validation. Under the Settings tab go to Allow and select Custom. In Formula enter "=LEN(E1)>0" (without quotes.) Make sure Ignore Blank is unchecked. Copy F1, highlight F2 to whatever ending cell you want. Right-click one of the cells, select paste special - validation. That should work for you.

Flyster
0
 
LVL 1

Author Comment

by:Geekamo
ID: 39239908
@ matthewspatrick,

I ended up using, "=COUNT($E3)=1".

@ Flyster,

I wasn't familiar with the LEN function, but that's pretty cool how that function gets the same answer in a different way. (I just read up on it to see how it functions)

@ All,

For now, I'll stick with the COUNT function - only because I am more familiar with it. But you both gave me great answers.

Any objections to me splitting the points between you both?

~ Geekamo
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 
LVL 22

Expert Comment

by:Flyster
ID: 39240069
Geekamo,

LEN function gives you the LENGTH of the data in the cell. So if your name was in A1, LEN(A1) would give you 7.  I have no problem with you giving Matthewspatrick all the points. His response was first and chosen. I'm just glad you found a solution to your problem.
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 39240898
Either way suits me :)
0
 
LVL 1

Author Comment

by:Geekamo
ID: 39242324
@ all,

400/100 split

Thank you again!

~ Geekamo
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question