Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
how do i create a macro that would check the contents of cells
Hi, I am stcuk on Excel VB. I am trying to create a macro that when run would
check to see if there is an 'X' in 6 specific cells on a row(the cells are next to each other), there is an X in all of them it would then display a msg saying 'not possible', else it would not doing anything. I hope i did pass the problem across in a sensible manner. Thanks for helping. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
how do i create a macro that would check the contents of cells
You wouldn't need to use VB for this. You could just use Data Validation.
Select your 6 cells, then select "Data" from the menu bar, then select "Validation..." In the ALLOW box, select "Custom" Then in the FORMULA box, enter: =NOT(AND($A$1:$F$1="X")) Of course, change the cell references to match your needs. You can then change the error messages to whatever you want. HTH, Elkar "Jade" wrote: Hi, I am stcuk on Excel VB. I am trying to create a macro that when run would check to see if there is an 'X' in 6 specific cells on a row(the cells are next to each other), there is an X in all of them it would then display a msg saying 'not possible', else it would not doing anything. I hope i did pass the problem across in a sensible manner. Thanks for helping. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i create a macro for putting a check in a box? | Excel Worksheet Functions | |||
requires that merged cells must be identically sized? | Excel Discussion (Misc queries) | |||
Macro that copy page to page just some filled cells | Excel Discussion (Misc queries) | |||
trying to create an (almost) circular formula between cells and data validated cells with lists | Excel Worksheet Functions | |||
Macro to delete data in 'green' cells only | Excel Worksheet Functions |