Need help in macros

F

Freeman_100

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
 
T

Tom Ogilvy

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
 
F

Freeman_100

Dear Tom
Thank you alot for your help, please help to set up this progarm.
Inever used marcos and I have already all the data over excel.

if you dont mind step by step, thanks again

Cherrs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top