LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Checking a cell's (Row,Column)

Hi there,

Within my cmdInsert code: when I click the cmdInsert i wish the code to
check to see if the activecell is one of 30 predifined cell address's. The
method I know would creat a huge if( and(. I wonder if there is a easier
way.

Example:
If activecell.address = D7 or F7 or H7 or J7 or L7 or D12 or F12 or H12 or
J12 or L12 or D17 or F17 or H17 or J17 or L17 or D22 or F22 or H22 or J22 or
L22 or D27 or F27 or H27 or J27 or L27 or D32 or F32 or H32 or J32 or L32
Then Activecell.value = "Craig"
elseif activecell.address = D8 or F8 or H8 or J8 or..... then
Activecell.value = "Doug"
elseif activecell.address = D9 or F9 or H9 or J9 or..... then
Activecell.value = "Michael"
Is there an easier way to test 7 sets of 30 cells ?


Thanks Craig


 
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
IF statement checking if a cell's text is red Shazzer Excel Worksheet Functions 7 April 3rd 23 02:40 PM
Checking a cell's format in a function FilJ59 Excel Worksheet Functions 1 March 10th 09 09:55 PM
can't highlight cell - highlights only cell's row and column MM Excel Discussion (Misc queries) 1 June 14th 05 02:41 PM
checking celll in column withblue New Users to Excel 3 May 26th 05 08:39 PM
checking value in column sals Excel Programming 1 December 18th 03 08:01 PM


All times are GMT +1. The time now is 12:02 PM.

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

About Us

"It's about Microsoft Excel"