I’m working on a macro from excel 2010.
I have a first sheet named “DATA”, there are accountability rules with theirs attributes.
<Rule name Source label Criteria etc… until column V
RGC-EC-01 AU-DU AUDIT =
RGC-EC-01 DU-FICT FICT R
RGC-EC-01 NNE-ECC CONTRACT E
RGC-EC-02 DU-FICT FICT >
RGC-EC-02 LO-DT DIT <>
etc…
The second sheet is named OUTCOME. At this moment except the titles (same as DATA sheet) there is no data. The aim to this sheet is to copy all the data from the sheet DATA according to the Rule name I’m looking for.
The Rule name are present to the column W (OUTCOME sheet) and there are several depending and what I’m looking for (another spreadsheet don’t worry about that). I would like to report the matching data regarding the value from colum W to OUTCOME sheet.
So it’s how to copy multi row (one rule has multiple row) from multiple lookup value (multiple rules (Range cell) in one command.
Ex
W2=RGC-EC-01
W3=RGC-EC-02
I want to retrieve all the value listed above and so on.
I’ve made an array formula but it’s focus on ONE VALUE (in this example the cell W2)
=IFERROR(INDEX(DATA!A$2:A$7000;SMALL(ROW(DATA!$A$2:$A$7000)*(DATA!$A$2:$A$7000=$W$2);COUNTIF(DATA!$A$2:$A$7000;"<>"&$W$2)+ROW()-1)-1);"")
I integrated this formula on the cell A2 from OUTCOME SHEET then I extend it to catch the next attribute (Source, Label etc...) from the rule name. It correctly reports all the rows from the rule present on W2 but as I said I’m limited to one lookup value (one rule).
The macro should loop this array formula to integrate all the value from column W while column W is not empty and copy data on the outcome sheet.
I’ve searched since 2 days but due to the lack of VBA skills I’m still unable to make it.
All help is welcome ! Thanks Regards, Chris