+ Reply to Thread
Results 1 to 1 of 1

Vba to loop to check value and copy results over

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    48

    Vba to loop to check value and copy results over

    Hi

    Wonder can anyone help.

    I am trying to use a Loop and and IF and another Loop in a macro with vba.

    Sheet1: Sheet_Source
    Sheet2: Sheet_Display

    I have unique ID in Sheet_Source and is sorted smallest to largest and also there is some ID's duplicated so I want to:

    STEP 1-
    In Sheet_Display Loop until next cell is blank in Column A Sheet_Source and then if there is a value in Sheet_Source Column A (ID)

    STEP2-
    Then In Sheet_Display Column A (ID) I want to compare the value above it is not equal to it then if it is true in that row

    STEP4-
    copy that ID into Column A in Sheet_Display and copy cells D from Sheet_Source to Sheet_Display Column C & F-AC in Sheet_Source to Sheet_Display E-AB

    STEP3-
    But if the ID is equal to the value above in Sheet_Display if there is duplicated IDs (which I have sorted together already in a macro) then loop through however many are there take the highest value from Column D of that group and do step 4.

    So I will have one ID per row and it is the highest amount of and no duplicated IDs.


    Can anyone help or give pointers if this is the correct approach,

    Thanks.
    Last edited by bkeat; 01-09-2013 at 09:30 AM.

+ Reply to Thread

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