Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Excel 2007-macro programming logic for data validation

Greetings,

I am new to this newsgroup, so nice to meet everyone!

I have an Excel dilemma that Id like help with.

Id like to apply some macro programming logic to a data validation cell
entry, so then when a certain data value is selected in the pull down, the
entire row changes color. Here is the algorithm I wish to follow:
1) Launch Excel 2007
2) Go to Data - Data Validation Button - Data Validation in pulldown
selection
3) On the Data Validation Window, select the following:
a. Allow: List (ignore blank and in-cell dropdown are selected/checked)
b. Source: Pass,Fail,Inactive

4) Now here is the fun partwhat I want to do is add macro programming
logic, so that the following occurs:
a. If Data Validation.Pass is selected, change the font color of all text in
the current row to green
b. If Data Validation.Fail is selected, change the font color of all text in
the current row to red
c. If Data Validation.Inactive is selected, change the font color of all
text in the current row to grey

If someone could help me figure this out, Id be MOST grateful. My email is
(derekmegac)(at)(hotmail)(dot)(com)

--
Derek Megyesi
Senior QA Engineer
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,522
Default Excel 2007-macro programming logic for data validation

easy to do with a worksheet_change event, using select case, tied to your
validation cell.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Derek Megyesi" wrote in message
...
Greetings,

I am new to this newsgroup, so nice to meet everyone!

I have an Excel dilemma that Id like help with.

Id like to apply some macro programming logic to a data validation cell
entry, so then when a certain data value is selected in the pull down, the
entire row changes color. Here is the algorithm I wish to follow:
1) Launch Excel 2007
2) Go to Data - Data Validation Button - Data Validation in pulldown
selection
3) On the Data Validation Window, select the following:
a. Allow: List (ignore blank and in-cell dropdown are
selected/checked)
b. Source: Pass,Fail,Inactive

4) Now here is the fun partwhat I want to do is add macro programming
logic, so that the following occurs:
a. If Data Validation.Pass is selected, change the font color of all text
in
the current row to green
b. If Data Validation.Fail is selected, change the font color of all text
in
the current row to red
c. If Data Validation.Inactive is selected, change the font color of all
text in the current row to grey

If someone could help me figure this out, Id be MOST grateful. My email
is
(derekmegac)(at)(hotmail)(dot)(com)

--
Derek Megyesi
Senior QA Engineer


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default Excel 2007-macro programming logic for data validation

You can do this without programming by using conditional formatting. If, for
example, A8 contains your data validation dropdown cell:
- select row 8
- select Home Conditional Formatting New Rule Use a formula to
determine which cells to format
- in the text box under the heading "Format value where this formula is
true", enter
=($A$8="Pass")
- click the Format button. On the Font tab, select your shade of green
- click OK OK

Repeat the steps above to add conditional formatting rules when A8 is Fail
or Inactive.

Hope this helps,

Hutch

"Derek Megyesi" wrote:

Greetings,

I am new to this newsgroup, so nice to meet everyone!

I have an Excel dilemma that Id like help with.

Id like to apply some macro programming logic to a data validation cell
entry, so then when a certain data value is selected in the pull down, the
entire row changes color. Here is the algorithm I wish to follow:
1) Launch Excel 2007
2) Go to Data - Data Validation Button - Data Validation in pulldown
selection
3) On the Data Validation Window, select the following:
a. Allow: List (ignore blank and in-cell dropdown are selected/checked)
b. Source: Pass,Fail,Inactive

4) Now here is the fun partwhat I want to do is add macro programming
logic, so that the following occurs:
a. If Data Validation.Pass is selected, change the font color of all text in
the current row to green
b. If Data Validation.Fail is selected, change the font color of all text in
the current row to red
c. If Data Validation.Inactive is selected, change the font color of all
text in the current row to grey

If someone could help me figure this out, Id be MOST grateful. My email is
(derekmegac)(at)(hotmail)(dot)(com)

--
Derek Megyesi
Senior QA Engineer

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
Data Validation using dependency logic maitri Excel Discussion (Misc queries) 1 November 12th 09 08:57 PM
Data Validation - Excel 2007 Nadine Excel Worksheet Functions 5 January 15th 09 07:10 PM
vba programming in excel 2007 [email protected] Excel Discussion (Misc queries) 4 May 16th 08 05:51 PM
USING DATA VALIDATION WITH CONDITIONAL LOGIC Data Validation AND Conditional Logic? Excel Discussion (Misc queries) 2 September 28th 07 05:09 PM
Excel VBA/Macro programming for beginners sdebu_2000 New Users to Excel 9 September 6th 06 06:29 AM


All times are GMT +1. The time now is 08:35 PM.

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"