(VBA_Need to pick data with multiple criteria without duplicating it

forginganewone

Board Regular
Joined
Mar 14, 2018
Messages
64
Result : The result going in a new sheet.
Criteria : only two criteria from A2 and G2. H2 is sheet name from which data will be searched and F2 is number of rows which should be picked.
Searching : I will be searching in a sheet with multiple columns. The column of A2 and G2 will be same in that sheet but other coulmns data will be different, so i want a script of formula to search and pick number of rows(F2) on criteria A2 and G2 but do not duplicate the rows.
For example value in F2 is 3, the script/forumla will pick 3 unique rows from sheet(H2) on criteria A2 and G2

Please find sample data here
https://expirebox.com/download/edf2c...b03667b11.html

Breakup sheet : from where formula will take criteria from
Cables sheet : from where it will search data
Results sheet : Where output should be given

Please note that i want the script to populate all the results of data in breakup sheet.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Further clarification:

If 'cables!A:A'='breakup!G:G' & 'cables!D:D'='break!A:A' then copy number of rows(given in 'breakup'g:g') to results sheet. It should not duplicate data and pick unique rows as other columns data will be unique in cables sheet for example asset codes and serial numbers.


the cables sheet is where it picks relevant data from, to use it in formula it should take it from 'breakup!H:H' column.

Please look at file : https://expirebox.com/download/edf2c...b03667b11.html for example.
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,519
Members
448,968
Latest member
Ajax40

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