Hello,
I am a student and new to use VBA.
My query is;
I have an excel sheet containing voucher details, I am planning to bring a summary sheet and able to pick one variable data from the "voucher" sheet to summary sheet.
I made it like productname1 as the first variable, that is in "A3" column of my summary sheet.
Similarly, I have productname2 and three respectively on "A4" and "A5".
The data I require is, when I run the code, macro has to select productname1 first then need to list in the report. Then it should go to productname2 and if it is there on the list before the productname1 occurring for the second time and list it.
like my input will be;
Sl. No Product
1. productname1
2. productname2
3. productname3
The result I look for;
Date Voucher No Product name Qty
1/11/2017 A001 productname1 10
1/11/2017 A001 productname2 05
2/11/2017 A008 productname1 08
2/11/2017 A008 productname3 15
5/11/2017 A019 productname2 7
5/11/2017 A019 productname3 11
I tried this to loop if inside the first if statement, but it is only picking the details of productname1.
If anyone can help please comment.
Regards,
Sumesh
I am a student and new to use VBA.
My query is;
I have an excel sheet containing voucher details, I am planning to bring a summary sheet and able to pick one variable data from the "voucher" sheet to summary sheet.
I made it like productname1 as the first variable, that is in "A3" column of my summary sheet.
Similarly, I have productname2 and three respectively on "A4" and "A5".
The data I require is, when I run the code, macro has to select productname1 first then need to list in the report. Then it should go to productname2 and if it is there on the list before the productname1 occurring for the second time and list it.
like my input will be;
Sl. No Product
1. productname1
2. productname2
3. productname3
The result I look for;
Date Voucher No Product name Qty
1/11/2017 A001 productname1 10
1/11/2017 A001 productname2 05
2/11/2017 A008 productname1 08
2/11/2017 A008 productname3 15
5/11/2017 A019 productname2 7
5/11/2017 A019 productname3 11
I tried this to loop if inside the first if statement, but it is only picking the details of productname1.
If anyone can help please comment.
Regards,
Sumesh