PDA

View Full Version : help to check several conditions on sheet



BigJC
10-04-2011, 06:38 AM
Okay

i have a sheet full of parts. the parts span across the columns in row 1

ie

... A B C D E F G H I
1 pt 1 pt 2 pt 3 pt 4 pt 5 pt 6 pt 7 pt 8
2 area
3 area
4 area

The sheet looks like so. Areas in col a parts across the top.

My problem is, before an order is submitted, i need to run checks.

Some parts other parts to make it work. the other parts can be in different areas but are still required.

How can i check these.

Example

Parts 1-5 are all required and 6-8 require 1 only of the three (not 1 each)

If any part between 1-8 is selected i need to run checks to find out which bits are missing and alert the user.

So say i order part 1 3 5 7, i will be missing 2 and 4 only, as 6 7 8 are variants of the same part.

if i order only 1 part 3 say, i need it to alert me that i am missing 1 2 4 5 and a controller (6 7 8)

Not sure of the most efficient way to do this in VBA

Thanks

Bob Phillips
10-04-2011, 08:04 AM
Use conditional formatting

=AND(B2="",COUNTIF($B$2:$F2,"<>")<>5)

for the first 5 columns

=COUNTIF($G2:$i2,"<>")>1

FOR THE OTHER 3

ianswer
10-04-2011, 01:13 PM
I request to please post your workbook.