Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jade
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i create a macro for putting a check in a box? Dakota Bleu Excel Worksheet Functions 1 December 19th 05 02:05 AM
requires that merged cells must be identically sized? Catt Excel Discussion (Misc queries) 11 July 3rd 05 12:36 PM
Macro that copy page to page just some filled cells LC Excel Discussion (Misc queries) 0 May 13th 05 11:22 PM
trying to create an (almost) circular formula between cells and data validated cells with lists KR Excel Worksheet Functions 0 May 12th 05 07:21 PM
Macro to delete data in 'green' cells only Steve Excel Worksheet Functions 7 March 19th 05 01:40 PM


All times are GMT +1. The time now is 11:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"