+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    08-17-2009
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Question VBA coding for Conditional Formatting

    Hi I have the following conditional formats:

    =AND($J8>=N$4,$K8<=O$4,$I8=1) - turns cell green
    =AND($J8>=N$4,$K8<=O$4,$I8=2) - turns cell red
    =AND($J8>=N$4,$K8<=O$4,$I8=0) - turns cell black

    but i need to add more so i need to use VBA coding!

    Im a beginner at VBA so dont really have an idea of the coding needed!

    Also, one point to note - i need these formulas to apply to a whole list of cells i.e. Cell rang L7:BO210 - so quite a lot of cells! And the values in the formulas change for each cell so for cell S13 for instance, the formulas would be:

    =AND($J13>=S$4,$K13<=T$4,$I13=1) - again cell green
    =AND($J13>=S$4,$K13<=T$4,$I13=2) - cell red
    =AND($J13>=S$4,$K13<=T$4,$I3=0) - cell black

    Any help would be great, thanks!!
    Attached Files Attached Files
    Last edited by rajbloggs; 09-07-2009 at 08:51 AM.

  2. #2
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,447

    Re: VBA Coding Help Needed!

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

  3. #3
    Registered User
    Join Date
    08-17-2009
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: VBA coding for Conditional Formatting

    Sorry, have changed title!

  4. #4
    Registered User
    Join Date
    08-17-2009
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: VBA coding for Conditional Formatting

    Bump no response

  5. #5
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,228

    Re: VBA coding for Conditional Formatting

    Please post a sample workbook so we can SEE the full scope of where you are applying these formats. Point it all out directly, perhaps some before/after samples, etc. Make it easy for us to help.

    Click GO ADVANCED and use the paperclip icon to post your sample workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  6. #6
    Registered User
    Join Date
    08-17-2009
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: VBA coding for Conditional Formatting

    Have just uploaded a sample workbook..Thanks!

  7. #7
    Registered User
    Join Date
    08-17-2009
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: VBA coding for Conditional Formatting

    Bump no response

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0