Excel MACRO - Copy Range depending on 2 different variables.

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

bootoine

Thread Starter
Joined
Apr 27, 2010
Messages
2
Hello

I am currently working on an excel file where I want to collect some data from a sheet (sheet B) to another sheet (sheet A)

Please see doc attached in my second message right below.


example:
1. Item AB3005 is Cat. 1 starting prod in Jan 2011
2. Would like to go and get range of data in Sheet B that correspond to Cat 1.
3. Then would to paste this range of data to Sheet 1.
4. Range of data should be pasted so that data under N in Sheet 2 corresponds to data pasted under start date in sheet 1


Sheet A
Item Category Start Date May-10Jun-10Jul-10Aug-10Sep-10Oct-10Nov-10AB3005 Cat. 1 Aug-10AD3307 Cat. 2 Jul-10CD2520 Cat. 1 Sep-10

Sheet B
Categories -2 -1 N+1 +2 Cat. 1 B C C D D Cat. 2 B C C D E Cat. 3 A C C F F

Results from Example:
Item Category Start Date May-10Jun-10Jul-10Aug-10Sep-10Oct-10Nov-10AB3005 Cat. 1 Aug-10B C C D D AD3307 Cat. 2 Jul-10B C C D E CD2520 Cat. 1 Sep-10B C C D D

I tried few times already and have been able to put hte right range from sheet B in front of the right category in sheet A. But I have not been able to adjust the range so that they are aligned with the start dates.

Would you have any idea how to do that?

Thank you for the support

Bootoine
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,643
I have taken a look at your example but honestly can't make anything of it.
I must have misundestood your explanation, but what is the meaning of the numbers in the 'Categories of Activities' sheet?
First the headers -2, -1, N, +1, +2, Wouldn't it be simpler to replace the N with 0
Is that what -1 -2 or -0?
Your solution sheet doesn't give me enough information to check your vba code and see if I can help.:confused:
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,643
Try it and see if you can work it out,
There is a text box with a short explanation of how I did it.


Forget this one see the next note!
 

Attachments

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top