+ Reply to Thread
Results 1 to 8 of 8

Need VBA to compare value of columns in different sheet and return value

  1. #1
    Registered User
    Join Date
    02-19-2016
    Location
    US
    MS-Off Ver
    2007
    Posts
    74

    Need VBA to compare value of columns in different sheet and return value

    Hi Experts,

    I have two sheets, one that has "Details" and other "Final".

    Here the sheet "Final" has column called "Status" and that is obtained by:
    Comparing Manager, LOB and Level from sheet "Details" with Employee Level and Approved amount in sheet "Final".

    If the approved amount is less than the allotted amount for that particular level then that Status should say "Under Limit" else "Above Limit"

    For Example in row 1 of Final Sheet, approved amount $60 (for Beginner level under respective manager, lob) is within the limit in "Details" sheet
    (i.e., Manager, LOB and Level - Beginner) hence status "Under Limit".

    Status column should populate based on the comparison.

    I would like to know if this can be achieved with formula or VBA. Please let me know if You need further information.

    Thanks for any help that may be provided!

    Details Sheet:
    man1.jpg

    Final Sheet:
    man2.jpg

    Thanks,
    Richa
    Last edited by Richavlaues; 07-19-2016 at 03:15 PM.

  2. #2
    Registered User
    Join Date
    02-19-2016
    Location
    US
    MS-Off Ver
    2007
    Posts
    74

    Re: Need VBA to compare value of columns in different sheet and return value

    dear all

    please advise if you find any solution

    thanks in advance.

  3. #3
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Need VBA to compare value of columns in different sheet and return value

    Richa,

    Pictures are great but even better then pictures is a workbook. Uploading an example mockup workbook with explanations and expected results is better.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  4. #4
    Registered User
    Join Date
    02-19-2016
    Location
    US
    MS-Off Ver
    2007
    Posts
    74

    Re: Need VBA to compare value of columns in different sheet and return value

    Hi Mike,

    Thanks for the reply. Can You please let me know how I can upload workbook in forum? I don't have option to upload file hence I created an account to post screenshots online and then am inserting that URL here.

    This is how editor looks.. and don't have attachment icon here:
    rte.jpg

    Meanwhile am figuring out on explaining the logic in a better way. So that's easy to understand and hope I get macro for it.

    Regards,
    Richa

  5. #5
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Karlstad, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    232

    Re: Need VBA to compare value of columns in different sheet and return value

    I have added a workbook with the example.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    1. Reply to thread and inform if suggestion was helpful or not
    2. Click on the star (=Add Reputation) if you think someone helped you
    3. Mark [SOLVED] to this thread if solution was found. (On Menu "Thread Tools" > "Mark this thread as solved")

  6. #6
    Registered User
    Join Date
    02-19-2016
    Location
    US
    MS-Off Ver
    2007
    Posts
    74

    Re: Need VBA to compare value of columns in different sheet and return value

    Sir You are simply amazing person. Macro works great and thanks for Your help and efforts. You clearly understood my requirements and provided solution for it where as I was still thinking how to make it simple in explaining the process. You are great. I wouldn't be able to write such wonderful macro even after 100 years. You are brilliant.. Thanks.

    Can You please let me know how to attach files to thread?

    Regards,
    Richa

  7. #7
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Karlstad, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    232

    Re: Need VBA to compare value of columns in different sheet and return value

    Richa,
    You can click "Go Advanced" down to the rights and then use "Manage Attachments" further down on page.

    I don't think attaching files should be so complicated. I have to think twice every time I am attaching a file i this forum. I understand if you have issues.

    Regards
    Joakim
    Attached Images Attached Images

  8. #8
    Registered User
    Join Date
    02-19-2016
    Location
    US
    MS-Off Ver
    2007
    Posts
    74

    Re: Need VBA to compare value of columns in different sheet and return value

    Thank You so much for Your help and pointing me in right direction. I clicked Go Advanced and then clicked on clip icon to attach file but nothing happened.
    Then I scrolled down the page to see other options and saw Manage Attachments. Probably it's browser issue I guess. Thanks again.

    Regards,
    Richa

+ 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. Replies: 3
    Last Post: 12-15-2015, 05:04 PM
  2. status count with query type omitting one status
    By Naheed in forum Excel General
    Replies: 15
    Last Post: 06-24-2015, 09:12 AM
  3. Macro to Compare two columns and publish sheet name in case columns dont match
    By adaws in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 01:21 PM
  4. [SOLVED] Compare columns, replace matching number with reference number and fill down random amount
    By datadigger in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-04-2012, 10:53 PM
  5. Replies: 4
    Last Post: 04-05-2012, 11:30 AM
  6. Replies: 5
    Last Post: 09-24-2009, 03:46 AM
  7. compare columns and count number of matching columns
    By san000 in forum Excel General
    Replies: 1
    Last Post: 07-15-2009, 10:31 PM

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