Populating one sheet from another in the same workbook

flaren

New Member
Joined
Jan 15, 2018
Messages
6
In the first sheet, where the data is entered, I want to populate the second sheet. Column "H" in the first sheet there is different data entered, and I want to find specifically STD-210, and then populate the associated sample number in the first sheet, which is in the "I" column, into the second sheet in the "B" column, but I keep encountering an issue that it's populating all data.

Below are examples of what I'm working with.

First sheet (below) in workbook, named: HG_2018_Sample_Tracking_MASTER
ABCDEFGHIJKLM
TypeFromToAreaLevelHeadingRoundString nameSample#ByDateShiftResult
C170SNR60170S-R605555Jan225.7
M170SNR58170S-R5820635Jan235.4
CSTD210STD-210456456Jan245.23
MSTD210STD-2101234Jan275.1
CSTD210STD-2106969Jan285.15

<tbody>
</tbody>

Second sheet (below) in workbook, named: QAQC - STD 210
ABC
STD-210
DateSample#Result
456456
456456
456456
1234
6969

<tbody>
</tbody>
Please note: Above in the tables the alphabet is representing the cells in excel, and the rows are the numbers, so for example, A1 in the second sheet is the STD-210 cell.

The formula that I have inserted in the second sheet, in column "B", is as follows:

=IFERROR(VLOOKUP(A$1,HG_2018_Sample_Tracking_MASTER!H2:I5246,2,FALSE),"")


How should I alter the formula to only find the STD-210 in the first sheet, and then populate the sample# associated with STD-210, into the "B" column in the second sheet?

Any insight would be greatly appreciated.

Thank you in advance.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Try


Excel 2010
ABC
1STD-210
2DateSample#Results
3456456
41234
56969
6 
7 
8 
9 
10 
11 
QAQC - STD 210
Cell Formulas
RangeFormula
B3{=IF(ROWS(B$3:B3)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B3))))}
B4{=IF(ROWS(B$3:B4)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B4))))}
B5{=IF(ROWS(B$3:B5)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B5))))}
B6{=IF(ROWS(B$3:B6)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B6))))}
B7{=IF(ROWS(B$3:B7)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B7))))}
B8{=IF(ROWS(B$3:B8)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B8))))}
B9{=IF(ROWS(B$3:B9)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B9))))}
B10{=IF(ROWS(B$3:B10)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B10))))}
B11{=IF(ROWS(B$3:B11)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B11))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
You sir, are a stellar individual... It appears to be working... I cannot express how grateful I am!! :biggrin:
 
Upvote 0
Try

Excel 2010
ABC
1STD-210
2DateSample#Results
3456456
41234
56969
6
7
8
9
10
11

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
QAQC - STD 210

Array Formulas
CellFormula
B3{=IF(ROWS(B$3:B3)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B3))))}
B4{=IF(ROWS(B$3:B4)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B4))))}
B5{=IF(ROWS(B$3:B5)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B5))))}
B6{=IF(ROWS(B$3:B6)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B6))))}
B7{=IF(ROWS(B$3:B7)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B7))))}
B8{=IF(ROWS(B$3:B8)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B8))))}
B9{=IF(ROWS(B$3:B9)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B9))))}
B10{=IF(ROWS(B$3:B10)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B10))))}
B11{=IF(ROWS(B$3:B11)>COUNTIF(HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,$A$1),"",INDEX(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6,SMALL(IF($A$1=HG_2018_Sample_Tracking_MASTER!$H$2:$H$6,ROW(HG_2018_Sample_Tracking_MASTER!$I$2:$I$6)-ROW(HG_2018_Sample_Tracking_MASTER!$I$2)+1),ROWS(B$3:B11))))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

Good day,


The formula that you suggested appears to work, but only to an extent. I should have added in my original post that this data is going to be on going, perhaps with a thousand plus entries, and how it is formulated now it only does the first four values that are STD-210. Is there a way to manipulate the formula to account for on going data entries?

Again, thank you in advance.
 
Upvote 0

Forum statistics

Threads
1,215,329
Messages
6,124,302
Members
449,149
Latest member
mwdbActuary

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