New to VBA - Help

L

lafinca47

Hi,

I'm new to VBA and this task is beyond my knowledge of VBA so any
advice would be great. I have a list of data set out like so in
worksheet 3:

1 A N
1 B N
1 C N
1 D N
1 E Y
1 F Y
1 G N
2 A N
2 B N
2 C Y
2 D Y
2 E N
2 F N
2 G N
3 A Y
3 B Y
3 C N
3 D N
3 E N
3 F N
3 G N

I want to create a macro that will look down colunm A and if value
below matches take the value in column C and paste it into worksheet 1
and then do the same again but paste the result in column C next to the
last value each time, and continue down until the value in column A
changes then do the same again until the value changes etc.

The end result I'm trying to achieve would look something like so:

A B C D E F G
1 N N N N Y Y N
2 N N Y Y N N N
3 Y Y N N N N N


The reason I'm doing this is because with the data vertical I have
close to 40,000 rows but by sorting it horizontally I will only be
dealing with around 2,000 rows.

Any help on this would be much aprieciated as I seemed to have spent
ages in VBA not really getting any where.

Thanks in advance for your help.
 
J

Jonathan West

This looks like a question about Excel. This group deals with VBA in Word.

The Excel VBA experts are at microsoft.public.excel.programming and I am
sure they will be able to help you.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
J

Jay Freedman

Well, it will help if you take the question over to the Excel programming
newsgroup -- this one is for Word, and the object models of the two programs
are quite different.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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