Consulting

Results 1 to 10 of 10

Thread: Solved: Excel VBA Code for higlighting Pass Or Fail profile

  1. #1

    Solved: Excel VBA Code for higlighting Pass Or Fail profile

    Dear Expertise,

    Currently I am working on one project & I am stuck in creating a loop & I have been not able to fine a solution.

    It would be of great help if anyone can help me on this with there expertise knowledge.

    Please find below a summary on the same.

    I have attached a sample spreadsheet in which I have already started working in Sheet1 wherein the raw data is also present.

    In the row number there are 7 command buttons out of which I have completed the 5 & the Big 2 are remaining for which I need help.

    The completed ones are:-

    Mandatory Pass: - when I click on this command button it looks in Column H whether it is Y if so it goes & looks in column A to see whether it is PASS. If it is PASS then it will highlight in GREEN.
    Mandatory Fail: - when I click on this command button it looks in Column H whether it is Y if so it goes & looks in column A to see whether it is FAIL. If it is FAIL then it will highlight in RED.
    Optional Pass: - when I click on this command button it looks in Column H whether it is N if so it goes & looks in column A to see whether it is PASS. If it is PASS then it will highlight in GREEN.
    Optional Fail: - when I click on this command button it looks in Column H whether it is N if so it goes & looks in column A to see whether it is FAIL. If it is FAIL then it will highlight in RED.

    The Pending Ones for which I need help are:-

    Highlight Pass: When I click on this button it should first look into Column B i.e. Profile (for example a1b1 is the first profile we have & there are 3 rows), for any given profile All Y should have a PASS & atleast one of the N also should have a PASS & then enter profile is considered as PASS.

    Highlight Fail: When I click on this button it should first look into Column B i.e. Profile (for example a1b1 is the first profile we have & there are 3 rows), for any given profile atleast one Y should have a FAIL & all N should have a FAIL & then enter profile is considered as FAIL.

    I have manually updated in Column I what should be the actual result for that particular profile & please note that in my original sheet this column will not be there.

    Just as an FYI I have also created two tabs "after hitting Highlight Pass" & "after hitting Highlight Fail" which contains the expected results from the Sheet 1.

    Kindly request to help me out in getting a solution for the Highlight Pass & Highlight Fail.

    Hope I would get some help from this expertise forum & also please let me know If in case for any other information required from my end.

    Thanks a lot for all your help & time in advance!!
    Attached Files Attached Files

  2. #2
    Please let me know in case if this is something that can be solved.

    Thanks
    Ajay Vijay

  3. #3

    help

    not sure whether this is something doable.

  4. #4
    VBAX Expert Tinbendr's Avatar
    Joined
    Jun 2005
    Location
    North Central Mississippi (The Pines)
    Posts
    993
    Location
    I did complete the loop, but I think your logic for determining Pass/Fail has some holes. Check out the highlight Pass button.

    I didn't have time to finish the Fail part.
    Attached Files Attached Files

    David


  5. #5
    Thanks a lot David..The Higlight pass is working as expected...You are truly very great... .
    As per your above instructions i ill go back & check the logic for Pas / Fail & also will work on the fail.

    One sincere request in case if you get time out of your busy schedule please provide me the solution for Fail also.

    Have a great day & weekend.

    Once again thanks a lot for all your help...i owe a lot to you!!

  6. #6
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,058
    Location
    Follow the logic of the "Pass" and transpose
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  7. #7
    Sure Sir...I am marking this thread as solved.

    Once again thanks a lot for all your time & help!!.

    Thanks

  8. #8

    Solved:Pass / Fail

    I forgot to attach the new version. Please find attached the same.
    Attached Files Attached Files

  9. #9
    VBAX Expert Tinbendr's Avatar
    Joined
    Jun 2005
    Location
    North Central Mississippi (The Pines)
    Posts
    993
    Location
    OK Ajay, I think I've got it.

    I combined both subs into one, passing a true or false to the sub to determine pass or fail.

    Give it a spin.
    Attached Files Attached Files

    David


  10. #10

    Pass / Fail

    You Rock

    The code is working as expected....

    Thanks a lot & have a great day

Posting Permissions

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