I want to copy, from a source sheet, select columns (h,f,e,g,k) out of relevant rows (relevant rows have column B entry that matches destination sheet A1/"title")
The formula I am using seems to skip the first row of relevant data. Can't figure out why.
Source sheet has header on row 1, data starts on row 2. Destination sheets have Sheet Title on row 1, header on row 2, then data gets copied in starting on row 3.
Source Sheet ('Paste-Data'):
ID | NAME | TYPE | STYLE | MOD | MFR | DESC | QTY | COST | MAR | PRI |
---|
1 | JOE | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
2 | JOE | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
3 | JOE | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 |
4 | BOB | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 |
5 | BOB | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 5 |
Formula in cell B3 on destination sheet:
=IFERROR(INDEX('Paste-Data'!$B$1:$K$4000,SMALL(IF('Paste-Data'!$B$1:$B$4000=$A$1,ROW('Paste-Data'!$B$1:$B$4000)),ROWS($H$1:$H2)),7),"")
this should take the QTY from column H on the source sheet and put it in column B on the destination sheet.
Formula in cell E3 on destination sheet:
=IFERROR(INDEX('Paste-Data'!$B$1:$K$4000,SMALL(IF('Paste-Data'!$B$1:$B$4000=$A$1,ROW('Paste-Data'!$B$1:$B$4000)),ROWS($G$1:$G2)),6),"")
this should take the DESC from column G on the source sheet and put it in column E on the destination sheet.
Destination Sheets current results:
ID | QTY | MFR | MOD | DESC | PRI |
---|
i | 2 | 2 | 2 | 2 | 2 |
ii | 3 | 3 | 3 | 3 | 3 |
iii | | | | | |
ID | QTY | MFR | MOD | DESC | PRI |
---|
i | 4 | 4 | 4 | 4 | 4 |
ii | | | | | |
Destination Sheets desired results:
ID | QTY | MFR | MOD | DESC | PRI |
---|
i | 1 | 1 | 1 | 1 | 1 |
ii | 2 | 2 | 2 | 2 | 2 |
iii | 3 | 3 | 3 | 3 | 3 |
ID | QTY | MFR | MOD | DESC | PRI |
---|
i | 4 | 4 | 4 | 4 | 4 |
ii | 5 | 5 | 5 | 5 | 5 |