Require VBA Code

loknathmondal

New Member
Joined
Sep 1, 2015
Messages
31
There are 4 excel sheets in a workbook and every sheet has huge data i.e.
datewise productwise sales details


Now i want get the below details in 5th excel sheet i.e. total sales of
specific product in specific time by using VBA code as every sheet has atleast
4-5 lakhs data



Why i'm asking this as i have to select specific product then specific priod of
each excel sheet and paste it to new excel sheet, it took 30-45 minutes.

Example Below:

[TABLE="width: 231"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Products[/TD]
[TD]Volume[/TD]
[TD]Transaction Date[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]76[/TD]
[TD="align: right"]17-10-17[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]130[/TD]
[TD="align: right"]19-10-17[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]12[/TD]
[TD="align: right"]21-10-17[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]110[/TD]
[TD="align: right"]23-10-17[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]137[/TD]
[TD="align: right"]25-10-17[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]117[/TD]
[TD="align: right"]27-10-17[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]125[/TD]
[TD="align: right"]29-10-17[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]45[/TD]
[TD="align: right"]31-10-17[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]124[/TD]
[TD="align: right"]02-11-17[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]66[/TD]
[TD="align: right"]04-11-17[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]105[/TD]
[TD="align: right"]06-11-17[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]54[/TD]
[TD="align: right"]08-11-17[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]30[/TD]
[TD="align: right"]10-11-17[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]69[/TD]
[TD="align: right"]12-11-17[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]140[/TD]
[TD="align: right"]14-11-17[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]29[/TD]
[TD="align: right"]16-11-17[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]118[/TD]
[TD="align: right"]18-11-17[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]95[/TD]
[TD="align: right"]20-11-17[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]47[/TD]
[TD="align: right"]22-11-17[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]126[/TD]
[TD="align: right"]24-11-17[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]112[/TD]
[TD="align: right"]26-11-17[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]35[/TD]
[TD="align: right"]28-11-17[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]17[/TD]
[TD="align: right"]30-11-17[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]82[/TD]
[TD="align: right"]02-12-17[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]81[/TD]
[TD="align: right"]04-12-17[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]10[/TD]
[TD="align: right"]06-12-17[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]93[/TD]
[TD="align: right"]08-12-17[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]35[/TD]
[TD="align: right"]10-12-17[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]75[/TD]
[TD="align: right"]12-12-17[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]64[/TD]
[TD="align: right"]14-12-17[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]88[/TD]
[TD="align: right"]16-12-17[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]135[/TD]
[TD="align: right"]18-12-17[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]35[/TD]
[TD="align: right"]20-12-17[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]84[/TD]
[TD="align: right"]22-12-17[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]104[/TD]
[TD="align: right"]24-12-17[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]72[/TD]
[TD="align: right"]26-12-17[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]43[/TD]
[TD="align: right"]28-12-17[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]39[/TD]
[TD="align: right"]30-12-17[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]68[/TD]
[TD="align: right"]01-01-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]85[/TD]
[TD="align: right"]03-01-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]66[/TD]
[TD="align: right"]05-01-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]135[/TD]
[TD="align: right"]07-01-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]53[/TD]
[TD="align: right"]09-01-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]32[/TD]
[TD="align: right"]11-01-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]70[/TD]
[TD="align: right"]13-01-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]12[/TD]
[TD="align: right"]15-01-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]130[/TD]
[TD="align: right"]17-01-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]127[/TD]
[TD="align: right"]19-01-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]78[/TD]
[TD="align: right"]21-01-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]52[/TD]
[TD="align: right"]23-01-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]143[/TD]
[TD="align: right"]25-01-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]132[/TD]
[TD="align: right"]27-01-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]93[/TD]
[TD="align: right"]29-01-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]87[/TD]
[TD="align: right"]31-01-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]31[/TD]
[TD="align: right"]02-02-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]68[/TD]
[TD="align: right"]04-02-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]94[/TD]
[TD="align: right"]06-02-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]111[/TD]
[TD="align: right"]08-02-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]94[/TD]
[TD="align: right"]10-02-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]20[/TD]
[TD="align: right"]12-02-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]63[/TD]
[TD="align: right"]14-02-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]45[/TD]
[TD="align: right"]16-02-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]14[/TD]
[TD="align: right"]18-02-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]121[/TD]
[TD="align: right"]20-02-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]129[/TD]
[TD="align: right"]22-02-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]35[/TD]
[TD="align: right"]24-02-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]29[/TD]
[TD="align: right"]26-02-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]18[/TD]
[TD="align: right"]28-02-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]132[/TD]
[TD="align: right"]02-03-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]93[/TD]
[TD="align: right"]04-03-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]51[/TD]
[TD="align: right"]06-03-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]122[/TD]
[TD="align: right"]08-03-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]64[/TD]
[TD="align: right"]10-03-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]141[/TD]
[TD="align: right"]12-03-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]49[/TD]
[TD="align: right"]14-03-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]43[/TD]
[TD="align: right"]16-03-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]82[/TD]
[TD="align: right"]18-03-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]59[/TD]
[TD="align: right"]20-03-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]83[/TD]
[TD="align: right"]22-03-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]140[/TD]
[TD="align: right"]24-03-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]25[/TD]
[TD="align: right"]26-03-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]30[/TD]
[TD="align: right"]28-03-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]65[/TD]
[TD="align: right"]30-03-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]91[/TD]
[TD="align: right"]01-04-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]109[/TD]
[TD="align: right"]03-04-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]68[/TD]
[TD="align: right"]05-04-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]36[/TD]
[TD="align: right"]07-04-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]148[/TD]
[TD="align: right"]09-04-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]57[/TD]
[TD="align: right"]11-04-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]14[/TD]
[TD="align: right"]13-04-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]82[/TD]
[TD="align: right"]15-04-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]110[/TD]
[TD="align: right"]17-04-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]133[/TD]
[TD="align: right"]19-04-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]80[/TD]
[TD="align: right"]21-04-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]51[/TD]
[TD="align: right"]23-04-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]12[/TD]
[TD="align: right"]25-04-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]36[/TD]
[TD="align: right"]27-04-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]25[/TD]
[TD="align: right"]29-04-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]111[/TD]
[TD="align: right"]01-05-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]41[/TD]
[TD="align: right"]03-05-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]66[/TD]
[TD="align: right"]05-05-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]51[/TD]
[TD="align: right"]07-05-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]45[/TD]
[TD="align: right"]09-05-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]84[/TD]
[TD="align: right"]11-05-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]95[/TD]
[TD="align: right"]13-05-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]105[/TD]
[TD="align: right"]15-05-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]17[/TD]
[TD="align: right"]17-05-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]141[/TD]
[TD="align: right"]19-05-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]52[/TD]
[TD="align: right"]21-05-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]30[/TD]
[TD="align: right"]23-05-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]52[/TD]
[TD="align: right"]25-05-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]105[/TD]
[TD="align: right"]27-05-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]123[/TD]
[TD="align: right"]29-05-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]108[/TD]
[TD="align: right"]31-05-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]134[/TD]
[TD="align: right"]02-06-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]126[/TD]
[TD="align: right"]04-06-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]128[/TD]
[TD="align: right"]06-06-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]110[/TD]
[TD="align: right"]08-06-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]72[/TD]
[TD="align: right"]10-06-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]71[/TD]
[TD="align: right"]12-06-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]24[/TD]
[TD="align: right"]14-06-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]18[/TD]
[TD="align: right"]16-06-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]45[/TD]
[TD="align: right"]18-06-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]109[/TD]
[TD="align: right"]20-06-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]20[/TD]
[TD="align: right"]22-06-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]54[/TD]
[TD="align: right"]24-06-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]60[/TD]
[TD="align: right"]26-06-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]145[/TD]
[TD="align: right"]28-06-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]125[/TD]
[TD="align: right"]30-06-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]52[/TD]
[TD="align: right"]02-07-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]141[/TD]
[TD="align: right"]04-07-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]144[/TD]
[TD="align: right"]06-07-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]24[/TD]
[TD="align: right"]08-07-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]96[/TD]
[TD="align: right"]10-07-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]34[/TD]
[TD="align: right"]12-07-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]84[/TD]
[TD="align: right"]14-07-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]48[/TD]
[TD="align: right"]16-07-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]105[/TD]
[TD="align: right"]18-07-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]42[/TD]
[TD="align: right"]20-07-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]71[/TD]
[TD="align: right"]22-07-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]12[/TD]
[TD="align: right"]17-10-17[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]58[/TD]
[TD="align: right"]19-10-17[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]117[/TD]
[TD="align: right"]21-10-17[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]13[/TD]
[TD="align: right"]23-10-17[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]111[/TD]
[TD="align: right"]25-10-17[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]71[/TD]
[TD="align: right"]27-10-17[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]16[/TD]
[TD="align: right"]29-10-17[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]14[/TD]
[TD="align: right"]31-10-17[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]142[/TD]
[TD="align: right"]02-11-17[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]142[/TD]
[TD="align: right"]04-11-17[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]43[/TD]
[TD="align: right"]06-11-17[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]96[/TD]
[TD="align: right"]08-11-17[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]67[/TD]
[TD="align: right"]10-11-17[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]103[/TD]
[TD="align: right"]12-11-17[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]29[/TD]
[TD="align: right"]14-11-17[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]49[/TD]
[TD="align: right"]16-11-17[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]73[/TD]
[TD="align: right"]18-11-17[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]93[/TD]
[TD="align: right"]20-11-17[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]35[/TD]
[TD="align: right"]22-11-17[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]127[/TD]
[TD="align: right"]24-11-17[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]119[/TD]
[TD="align: right"]26-11-17[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]73[/TD]
[TD="align: right"]28-11-17[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]77[/TD]
[TD="align: right"]30-11-17[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]139[/TD]
[TD="align: right"]02-12-17[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]126[/TD]
[TD="align: right"]04-12-17[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]53[/TD]
[TD="align: right"]06-12-17[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]19[/TD]
[TD="align: right"]08-12-17[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]98[/TD]
[TD="align: right"]10-12-17[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]44[/TD]
[TD="align: right"]12-12-17[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]86[/TD]
[TD="align: right"]14-12-17[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]46[/TD]
[TD="align: right"]16-12-17[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]99[/TD]
[TD="align: right"]18-12-17[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]142[/TD]
[TD="align: right"]20-12-17[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]64[/TD]
[TD="align: right"]22-12-17[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]71[/TD]
[TD="align: right"]24-12-17[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]130[/TD]
[TD="align: right"]26-12-17[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]56[/TD]
[TD="align: right"]28-12-17[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]103[/TD]
[TD="align: right"]30-12-17[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]122[/TD]
[TD="align: right"]01-01-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]29[/TD]
[TD="align: right"]03-01-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]11[/TD]
[TD="align: right"]05-01-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]56[/TD]
[TD="align: right"]07-01-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]120[/TD]
[TD="align: right"]09-01-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]35[/TD]
[TD="align: right"]11-01-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]138[/TD]
[TD="align: right"]13-01-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]19[/TD]
[TD="align: right"]15-01-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]89[/TD]
[TD="align: right"]17-01-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]134[/TD]
[TD="align: right"]19-01-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]110[/TD]
[TD="align: right"]21-01-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]27[/TD]
[TD="align: right"]23-01-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]25[/TD]
[TD="align: right"]25-01-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]132[/TD]
[TD="align: right"]27-01-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]137[/TD]
[TD="align: right"]29-01-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]128[/TD]
[TD="align: right"]31-01-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]60[/TD]
[TD="align: right"]02-02-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]131[/TD]
[TD="align: right"]04-02-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]121[/TD]
[TD="align: right"]06-02-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]122[/TD]
[TD="align: right"]08-02-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]136[/TD]
[TD="align: right"]10-02-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]123[/TD]
[TD="align: right"]12-02-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]135[/TD]
[TD="align: right"]14-02-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]89[/TD]
[TD="align: right"]16-02-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]135[/TD]
[TD="align: right"]18-02-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]115[/TD]
[TD="align: right"]20-02-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]119[/TD]
[TD="align: right"]22-02-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]147[/TD]
[TD="align: right"]24-02-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]18[/TD]
[TD="align: right"]26-02-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]83[/TD]
[TD="align: right"]28-02-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]40[/TD]
[TD="align: right"]02-03-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]124[/TD]
[TD="align: right"]04-03-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]104[/TD]
[TD="align: right"]06-03-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]24[/TD]
[TD="align: right"]08-03-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]35[/TD]
[TD="align: right"]10-03-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]126[/TD]
[TD="align: right"]12-03-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]68[/TD]
[TD="align: right"]14-03-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]63[/TD]
[TD="align: right"]16-03-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]76[/TD]
[TD="align: right"]18-03-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]58[/TD]
[TD="align: right"]20-03-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]129[/TD]
[TD="align: right"]22-03-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]81[/TD]
[TD="align: right"]24-03-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]93[/TD]
[TD="align: right"]26-03-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]103[/TD]
[TD="align: right"]28-03-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]150[/TD]
[TD="align: right"]30-03-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]104[/TD]
[TD="align: right"]01-04-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]19[/TD]
[TD="align: right"]03-04-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]72[/TD]
[TD="align: right"]05-04-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]116[/TD]
[TD="align: right"]07-04-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]85[/TD]
[TD="align: right"]09-04-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]63[/TD]
[TD="align: right"]11-04-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]74[/TD]
[TD="align: right"]13-04-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]46[/TD]
[TD="align: right"]15-04-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]103[/TD]
[TD="align: right"]17-04-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]124[/TD]
[TD="align: right"]19-04-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]10[/TD]
[TD="align: right"]21-04-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]87[/TD]
[TD="align: right"]23-04-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]33[/TD]
[TD="align: right"]25-04-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]91[/TD]
[TD="align: right"]27-04-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]123[/TD]
[TD="align: right"]29-04-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]84[/TD]
[TD="align: right"]01-05-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]77[/TD]
[TD="align: right"]03-05-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]16[/TD]
[TD="align: right"]05-05-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]105[/TD]
[TD="align: right"]07-05-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]64[/TD]
[TD="align: right"]09-05-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]50[/TD]
[TD="align: right"]11-05-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]48[/TD]
[TD="align: right"]13-05-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]66[/TD]
[TD="align: right"]15-05-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]48[/TD]
[TD="align: right"]17-05-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]72[/TD]
[TD="align: right"]19-05-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]147[/TD]
[TD="align: right"]21-05-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]146[/TD]
[TD="align: right"]23-05-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]11[/TD]
[TD="align: right"]25-05-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]115[/TD]
[TD="align: right"]27-05-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]90[/TD]
[TD="align: right"]29-05-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]129[/TD]
[TD="align: right"]31-05-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]19[/TD]
[TD="align: right"]02-06-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]70[/TD]
[TD="align: right"]04-06-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]107[/TD]
[TD="align: right"]06-06-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]120[/TD]
[TD="align: right"]08-06-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]22[/TD]
[TD="align: right"]10-06-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]128[/TD]
[TD="align: right"]12-06-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]70[/TD]
[TD="align: right"]14-06-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]20[/TD]
[TD="align: right"]16-06-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]35[/TD]
[TD="align: right"]18-06-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]131[/TD]
[TD="align: right"]20-06-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]32[/TD]
[TD="align: right"]22-06-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]27[/TD]
[TD="align: right"]24-06-18[/TD]
[/TR]
[TR]
[TD]Mango[/TD]
[TD]43[/TD]
[TD="align: right"]26-06-18[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]14[/TD]
[TD="align: right"]28-06-18[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]108[/TD]
[TD="align: right"]30-06-18[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]76[/TD]
[TD="align: right"]02-07-18[/TD]
[/TR]
[TR]
[TD]Guava[/TD]
[TD]63[/TD]
[TD="align: right"]04-07-18[/TD]
[/TR]
[TR]
[TD]Cherry[/TD]
[TD]104[/TD]
[TD="align: right"]06-07-18[/TD]
[/TR]
[TR]
[TD]Sweet[/TD]
[TD]49[/TD]
[TD="align: right"]08-07-18[/TD]
[/TR]
[TR]
[TD]Papiya[/TD]
[TD]88[/TD]
[TD="align: right"]10-07-18[/TD]
[/TR]
[TR]
[TD]Litchi[/TD]
[TD]29[/TD]
[TD="align: right"]12-07-18[/TD]
[/TR]
[TR]
[TD]Jack Fruit[/TD]
[TD]76[/TD]
[TD="align: right"]14-07-18[/TD]
[/TR]
[TR]
[TD]Lemon[/TD]
[TD]131[/TD]
[TD="align: right"]16-07-18[/TD]
[/TR]
[TR]
[TD]Ginger[/TD]
[TD]135[/TD]
[TD="align: right"]18-07-18[/TD]
[/TR]
[TR]
[TD]Garlic[/TD]
[TD]98[/TD]
[TD="align: right"]20-07-18[/TD]
[/TR]
[TR]
[TD]Cumin[/TD]
[TD]63[/TD]
[TD="align: right"]22-07-18[/TD]
[/TR]
</tbody>[/TABLE]



Regards
Loknath
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
1. I think you are using the wrong tool....you want ms Access.
2. Have you tried using pivot tables in excel?
 
Upvote 0
Had to look up definition of
lakhs
.
Says
lakhs
means hundred thousand.

So if you have 4-5
lakhs
rows of data on 4 sheets and you want to do evaluation on all this data.
This is beyond my knowledgebase.
I will continue to monitor this thread to see what I can learn.
 
Upvote 0
Hint: Best to keep sample data smaller than what you provided.

Assuming ..
- The data like you have shown is in columns A:C of each sheet with headings in row 1
- The dates are real dates (numbers) not text
- You can set up the 5th sheet, called "Summary" like below, entering your criteria in range A2:C2. (The name & layout could be different but the code would need to be adjusted to match)


Book1
ABCD
1ProductStart DateEnd DateVolume
2Mango1-10-201731-03-2018
Summary


Then try running this macro
Code:
Sub TotalSales()
  Dim ws As Worksheet
  Dim sProd As String
  Dim dStart As Date, dEnd As Date
  Dim a As Variant
  Dim i As Long
  Dim TotSales As Double
  
  With Sheets("Summary")
    sProd = LCase(.Range("A2").Value)
    dStart = .Range("B2").Value
    dEnd = .Range("C2").Value
  End With
  For Each ws In Worksheets
    If ws.Name <> "Summary" Then
    a = ws.Range("A1", ws.Range("C" & ws.Rows.Count).End(xlUp)).Value
    For i = 2 To UBound(a)
      If LCase(a(i, 1)) = sProd Then
        If a(i, 3) >= dStart Then
          If a(i, 3) <= dEnd Then TotSales = TotSales + a(i, 2)
        End If
      End If
    Next i
    End If
  Next ws
  Sheets("Summary").Range("D2").Value = TotSales
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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