Hello, I'm new here and need some help.

I need to perform stock analysis regularly, which involves the use of files 
with data in multiple columns and more than 100K lines of records.  

To provide a better illustration of the routine tasks I perform, I've 
attached a file for simulation purpose.

Let’s assume that one of the regular reports that I prepare is the one that 
summarise the stock info as shown in the worksheet titled “Report”.  To 
prepare the report, I sort the data in the worksheet “Data” and then use 
Index and Match formula to extract the data (based on the conditions shown 
in the formula).

In this example, the table in the “Report” summarises the stock info by 
company, item and stock location.  However, not all records in the 
worksheet “Data” will be extracted to this report.  In fact, only the top 
six (in terms of stock value) records that match the criteria will be 
extracted.  

For example, there are 14 records found in the worksheet “Data” that match 
the conditions “Item A”, “Store 1” and “ABC”.  As a result of the "top six" 
rule, only the six records with highest stock value are displayed in the 
“Report”.  Likewise, only 2 records are found in the worksheet “Data” that 
match the conditions “Item A”, “Store 3” and “ABC”.   All the two are 
extracted and displayed in the “Report”.

The number of lines to be shown in the “Report” is fixed i.e. if the number 
of records found with the matching criteria is less than 6, “NA” will be 
displayed in the “extra” lines (as displayed in the “Report” for item A 
stored in “Store 3” and owned by “ABC”.

I hope someone could show me how to create a macro that would replace the 
Index and Match formula.  The current method of using the Index and Match 
formula is just not that efficient, especially when there are thousand of 
stock items that need to be analysed.

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.

Attachment: Extract Stock Data.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Reply via email to