Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Conditional formating or Macro code

Hi,

I need help on setting colors to rows depending on a cell value from
those rows.

I have a sales spreadsheet with 8 sales reps information on it.
Each row has a single invoice.

I want to assign a color to the row cell range depending on the sales
rep code.

For Example.
If on the first in column A I list the sales rep codes like "EM",
"EV", "RP" , etc

If A2 says "EM" I want the cell range A2:H2 to be pink
If A3 says "EV" I want the cell range A3:H3 to be orange

I want to set it up so when I type the sales rep code it will
automatically asign the color to the row range

Thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Conditional formating or Macro code

You can do this with a Conditional Format if you have 3 or less sales reps.
If more than 3, you'll need to do with with a Worksheet_Change event macro.

This should get you started.

http://www.cpearson.com/excel/cformatting.htm

HTH,
Barb Reinhardt

" wrote:

Hi,

I need help on setting colors to rows depending on a cell value from
those rows.

I have a sales spreadsheet with 8 sales reps information on it.
Each row has a single invoice.

I want to assign a color to the row cell range depending on the sales
rep code.

For Example.
If on the first in column A I list the sales rep codes like "EM",
"EV", "RP" , etc

If A2 says "EM" I want the cell range A2:H2 to be pink
If A3 says "EV" I want the cell range A3:H3 to be orange

I want to set it up so when I type the sales rep code it will
automatically asign the color to the row range

Thanks in advance


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Conditional formating or Macro code

Thanks,

Does anyone have an example file for more than 3?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Conditional formating or Macro code

http://rhdatasolutions.com/ConditionalFormatVBA/

" wrote:

Thanks,

Does anyone have an example file for more than 3?




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
Formating Cells used code when worksheet opened Don Excel Worksheet Functions 2 December 12th 06 06:29 AM
Macro code to delete conditional formatting Bovine Jones Excel Discussion (Misc queries) 5 October 19th 06 08:39 AM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM
Formating Sheets made in Code Jenn Excel Discussion (Misc queries) 1 August 22nd 05 05:19 PM
Conditional Formating PaolaAndrea Excel Worksheet Functions 10 May 25th 05 02:33 AM


All times are GMT +1. The time now is 06:24 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"