Multiple value list to be formed

sumeshh

New Member
Joined
Nov 13, 2017
Messages
1
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
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top