Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


--
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare two columns Jennifer Hammonds Excel Discussion (Misc queries) 2 April 25th 07 05:54 PM
Compare two columns Kaizen10 Excel Discussion (Misc queries) 0 April 27th 06 05:06 PM
compare columns fluffy Excel Worksheet Functions 3 March 10th 06 03:59 PM
Compare two columns Need Helper Excel Discussion (Misc queries) 3 December 4th 04 03:08 AM
Compare columns of value fl Excel Programming 1 August 4th 04 07:46 PM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"