Sep 28 2017
12:48 AM
- last edited on
Jul 25 2018
09:40 AM
by
TechCommunityAP
Sep 28 2017
12:48 AM
- last edited on
Jul 25 2018
09:40 AM
by
TechCommunityAP
Hi all,
I'm quite new to all the vba possibilities so I hope that what I'm wishing for exists.
Basically, I'd like to be able to populate rows with some data based on a number that is on a cell.
I'll use an example to be more understandable :
We have this table that refers the number of items that are bought in each market.
Market | Items |
Sydney | 3 |
Melbourne | 2 |
Brisbane | 4 |
Now, the situation is that every Item has a special number and they are all registered based on their market as well:
Market | Item Number | Information x | Information Y | Information Z |
Sydney | ITEM01 | |||
Sydney | ITEM02 | |||
Sydney | ITEM03 | |||
Melbourne | ITEM04 | |||
Melbourne | ITEM05 | |||
Brisbane | ITEM06 | |||
Brisbane | ITEM07 | |||
Brisbane | ITEM08 | |||
Brisbane | ITEM09 |
(and we have many more items of course )
What we would like to do is to populate the second table automatically based on the numbers in the column 2 in the first table. (Like it is done in the 2nd table) Because here it was done manually but we would like to avoid that process.
So basically, based on the number of items in table 1 (3 items for sydney for example), we'd like the macro to be able to pick 3 items number that are located in Sydney and paste them in another table (on another sheet).
As you can imagine we're working with bigger numbers and our numbers in column 2 in table 1 will always be different, which is why we would like that process to be automated.
Does anyone has any idea on how to do this ?
Feel free to ask questions, it's quite a tricky thing to explain,
thanks for your help,
Lau
Oct 03 2017 06:48 AM
How do you know that Melborne is going to be ITEM04 and ITEM05 instead of ITEM06 and ITEM07? In other words, do the item numbers always increment by 1 using the order of table 1?