+ Reply to Thread
Results 1 to 2 of 2

compare 2 columns

  1. #1
    Registered User
    Join Date
    04-05-2006
    Posts
    7

    compare 2 columns

    Hi guys

    -I like to compare to columns (A, S) ,
    for exemple A2 with the hole of S depnds to rows numbers of S
    -and if for exemple A2 = S10, then I like to put all the row (M10, N10, O10, P 10, Q 10 and R10) in another coloumn X2

    thanks alot for your advise
    Cherrs

  2. #2
    Tom Ogilvy
    Guest

    RE: compare 2 columns

    Dim rng as Range, i as long, res as Variant

    set rng = Range(Cells(1,"S"),cells(rows.count,"S"))
    i = 2
    do while not isempty(cells(i,"A"))
    res = application.Match(cells(i,"A"),rng,0)
    if not iserror(res) then
    cells(res,"X").Resize(1,6).Value = _
    cells(i,"M").Resize(1,6)
    end if
    i = i + 1
    Loop

    --
    Regards,
    Tom Ogilvy



    "Freeman_100" wrote:

    >
    > Hi guys
    >
    > -I like to compare to columns (A, S) ,
    > for exemple A2 with the hole of S depnds to rows numbers of S
    > -and if for exemple A2 = S10, then I like to put all the row (M10, N10,
    > O10, P 10, Q 10 and R10) in another coloumn X2
    >
    > thanks alot for your advise
    > Cherrs
    >
    >
    > --
    > Freeman_100
    > ------------------------------------------------------------------------
    > Freeman_100's Profile: http://www.excelforum.com/member.php...o&userid=33208
    > View this thread: http://www.excelforum.com/showthread...hreadid=530516
    >
    >


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