+ Reply to Thread
Results 1 to 8 of 8

Thread: Conditional Formatting (?) help

  1. #1
    Registered User
    Join Date
    12-08-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    4

    Conditional Formatting (?) help

    This might be a very simple question but I've been googling and playing around in Excel for a while now, unable to find a solution.

    I have a spreadsheet with values in column G. If this value is over 1, I would like to mark various columns for the next x rows, x being the value in column G. I have basic programming knowledge and I have thought of multiple ways to do this through any number of programming languages but I can't find a way to implement this in Excel.

    Any suggestions?

  2. #2
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Conditional Formatting (?) help

    Something like this?

    Sub Test()
    Dim cell As Range
    
    For Each cell In Range("G1:G100")
        If cell > 1 Then cell.Offset(0, 1) = "X"
    Next cell
    
    End Sub
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  3. #3
    Registered User
    Join Date
    12-08-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Conditional Formatting (?) help

    I'm sorry, I should have mentioned that I have very little experience with Excel. Where do I go to enter that?

    Thanks for the response, that looks very promising.

  4. #4
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Conditional Formatting (?) help

    In your Excel spreadsheet, Hit ALT + F11, On the top you'll see Insert option, from there click Module. In the module window copy and paste the code, and you can run the macro by pressing F5
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  5. #5
    Registered User
    Join Date
    12-08-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Conditional Formatting (?) help

    Thanks for the help. I believe I could modify this to suit my needs but will this need to be run every time new data is entered? This isn't for personal use and while I could try to explain it to the user, I do not know if it is the best solution.

    Again, I don't have much experience with Excel, so it may be the only solution.

  6. #6
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Conditional Formatting (?) help

    You can create a button using shape, and just assigned the macro to the button.
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  7. #7
    Valued Forum Contributor
    Join Date
    12-14-2009
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    986

    Re: Conditional Formatting (?) help

    silly me. I didn't read your question carefully. In H1 copy and paste this and drag it down

    =IF(G1>1,"X","")
    To thank someone who has helped you, click on the star icon below their name.

    I hate reading

    Portfolio

    I need a job.
    I am young and incompetent

  8. #8
    Registered User
    Join Date
    12-08-2011
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Conditional Formatting (?) help

    Haha, I tried all sorts of things with if statements and while yours doesn't do what I want it sparked something in my head and I think I know how to do what I want. Thanks for all of your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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