+ Reply to Thread
Results 1 to 25 of 25

Condional Formatting...maybe

  1. #1
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Condional Formatting...maybe

    Hello All!!!

    I have come across an impasse and would like some help getting through it. In short, I have 3 sheets, 2 of which are relevant to this issue. On sheet HS, I have about 7000 lines. among the 8 or 9 columns, two are of interest. One column has an "Account number" the other has an Employee that is assigned to that account. the account number repeats itself everytime a job has been entered along with the employee who is over that job at the time.

    On sheet TD I have a list of all the account numbers in one column along with the CURRENT employee who is over this account.

    What I am wanting to do is determine if the CURRENT employee for an account differs from the HS sheet. Meaning did this account change hands over the period of time of my data, if so highlight that account.

    This is just step one of my idea...next I would like to copy this entire line (if highlighted) and place on a new sheet. but I guess I can cross that bridge when I get there.

    Attached is an example of what I have, then what I am looking for.

    Thanks
    BD

    Conditional Example.xlsx

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Condional Formatting...maybe

    In your sample, A.Smith does not change accounts but is highlighted? Or am I missing something.

  3. #3
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Condional Formatting...maybe

    Maybe
    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  4. #4
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    Quote Originally Posted by JOHN H. DAVIS View Post
    In your sample, A.Smith does not change accounts but is highlighted? Or am I missing something.
    Walmart had changed hands ( from K.Jones to A.Smith) I am looking for the account changing, not employee.


    Souls,

    So you are not reading anything from the TD Sheet are you? Just assuming that the first three entries on HS are current? in my real data this is not the case and is why I have the TD sheet...unless I am missing something

    seems really close though

  5. #5
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Condional Formatting...maybe

    Yes its reading from the TD sheet. TD isn't listed because I had that code in the sheet module for TD.

    Right click sheet tab for TD, click 'View Code', and copy and paste there.

  6. #6
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    ok I see, you have to be on that sheet when running the macro. Well now that I know it works as intended....I am running into an issue with the difference in my example and my real data. the R1C1 selection is confusing me (as always) in my real data, the columns in HS are actually Employee = C:C account = I:I and TD are employee = B:B and Account = D:D. I tried to adjust them in the code as I always do, but after a few attempts got frustrated and called it quits ha.

    thanks again

  7. #7
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Condional Formatting...maybe

    Can you post an example with the data in the areas they need to be?

    It doesn't matter what sheet you're on. It just matters where you place the code.

  8. #8
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    this should give you the idea

    Conditional Example.xlsx

  9. #9
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Condional Formatting...maybe

    Please Login or Register  to view this content.
    Here it is ammended.

    For future record, it is better if exampe have an accuracte example of the format. It will always prevent headaches.

  10. #10
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    aahhh I was so close....noted and thanks for the help....I should be able to figure out the movement of all these to another sheet

    thanks again
    BD

  11. #11
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Condional Formatting...maybe

    Glad to help.

    Thank you for marking the thread as solved.

    On any thread you can show your appreciation to those who have helped you by clicking the * below their post.

  12. #12
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    well I jumped the gun on this....when I get to this line

    Please Login or Register  to view this content.
    I get a runtime error '91': Object variable or With Block variable not set

    ??

  13. #13
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Condional Formatting...maybe

    Please Login or Register  to view this content.
    Probably an error I didn't trap caused by the range.find method not finding anything. Try this.

  14. #14
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    LIst of real.xlsm


    the macro "worked" meaning no errors, but didn't highlight anything...I know that's not the real case...

  15. #15
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Condional Formatting...maybe

    Column I on Hold Section Data is Rig numbers not names or Customers


    e/ The format, layout, and sheet names are all different. you might have to redescribe what you're trying to achieve.
    Last edited by Solus Rankin; 08-14-2014 at 04:54 PM.

  16. #16
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Condional Formatting...maybe

    Looking through your tabs... if I had to guess the worksheet references are backwards from what you're trying to do.

  17. #17
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    gah...I suck ha.

    ok. on Sheet1 I would like to highlight the Rig Number IF the Superintendent in the hole section data sheet is different on any row that what is shown in Sheet1 superintendent.

  18. #18
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    on what I called the column names, I was just doing that to try to simplify it...I think I ended up confusing myself, along with you ha

  19. #19
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    were you able to come up with something Solus?

  20. #20
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Condional Formatting...maybe

    Working on a solution.

    I need to clear up some details.

    You would like to go through each record on List of real sheet 1, compare it to the history on Hole section data, and if a rig # was ever passed between two superintendents, then you want to highlight the rig # on sheet1?

  21. #21
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    that is correct

  22. #22
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Condional Formatting...maybe

    Lets try this

    Example Solus Edit.xlsm

  23. #23
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    NICE....seems to be working as inteneded . again thanks for all your help and sorry for the confusion!!

    Thanks BD

  24. #24
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    I hate to bring this back up, but I see no sense in creating a new post as it pretty much the same question. I am trying to run this code and, but instead of using the two sheets that's in the example above, I am using two of the "Sheet1" sheets to compare to each other. I figured this would be as easy as changing the sheet names, and adjusting the columns...when I run the code below, it goes to the first IF, then jumps to the end.

    Please Login or Register  to view this content.

  25. #25
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Condional Formatting...maybe

    I hate to bring this back up, but I see no sense in creating a new post as it pretty much the same question. I am trying to run this code and, but instead of using the two sheets that's in the example above, I am using two of the "Sheet1" sheets to compare to each other. I figured this would be as easy as changing the sheet names, and adjusting the columns...when I run the code below, it goes to the first IF, then jumps to the end.

    Please Login or Register  to view this content.
    any ideas?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Condional formatting, based on another cell
    By Sibrulotte in forum Excel General
    Replies: 1
    Last Post: 07-20-2010, 01:37 PM
  2. Duplication in rows condional formatting
    By MAXIM in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 06-11-2010, 11:53 AM
  3. Condional Formatting
    By alex1982 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-14-2007, 09:33 AM
  4. [SOLVED] cannot delete condional formatting
    By Robert in forum Excel General
    Replies: 1
    Last Post: 09-28-2005, 03:05 PM
  5. Condional formatting
    By maccaz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-25-2005, 11:06 AM

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.6.0 RC 1