Hi all,
I would like to retrieve or display all match data in a column through either vba or formulas without using long formulas that causes the sheet to lag.
For example:
raw data with Input ("Dog")
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]Col A[/TD]
[TD]Col B[/TD]
[TD]Col C[/TD]
[TD]Col D[/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]5[/TD]
[TD]Input:[/TD]
[TD]Dog[/TD]
[/TR]
[TR]
[TD]Cat[/TD]
[TD]3[/TD]
[TD]Result(s):[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Duck[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Output data
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]Col A[/TD]
[TD]Col B[/TD]
[TD]Col C[/TD]
[TD]Col D[/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]5[/TD]
[TD]Input:[/TD]
[TD]Dog[/TD]
[/TR]
[TR]
[TD]Cat[/TD]
[TD]3[/TD]
[TD]Result(s):[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]12[/TD]
[TD][/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]Duck[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
As of my previous project, i had to use a formula that looks something like this:
'Retrieve data of the matched value in other column in another page (very messy I know)
={IF(ISERROR(INDEX(Data5!$B:$B,SMALL(IF($A$1=Data5!$A:$A,ROW(Data5!$A:$A)-ROW(Data5!$A$1)+1),COLUMN(B1)))),"",INDEX(Data5!$B:$B,SMALL(IF($A$1=Data5!$A:$A,ROW(Data5!$A:$A)-ROW(Data5!$A$1)+1),COLUMN(B1))))}
Honestly it is very messy and slow when it retrieves multiple data but I couldn't find any other way to make the code more consistent. Does anyone have any way with using formulas or even vba commands? I'm fine with any as long as the code does not go as long as above. If you have an idea for the the one shown in the example, do share! Any comments is well appreciated.
Thanks!
I would like to retrieve or display all match data in a column through either vba or formulas without using long formulas that causes the sheet to lag.
For example:
raw data with Input ("Dog")
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]Col A[/TD]
[TD]Col B[/TD]
[TD]Col C[/TD]
[TD]Col D[/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]5[/TD]
[TD]Input:[/TD]
[TD]Dog[/TD]
[/TR]
[TR]
[TD]Cat[/TD]
[TD]3[/TD]
[TD]Result(s):[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Duck[/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Output data
[TABLE="class: grid, width: 250"]
<tbody>[TR]
[TD]Col A[/TD]
[TD]Col B[/TD]
[TD]Col C[/TD]
[TD]Col D[/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]5[/TD]
[TD]Input:[/TD]
[TD]Dog[/TD]
[/TR]
[TR]
[TD]Cat[/TD]
[TD]3[/TD]
[TD]Result(s):[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]12[/TD]
[TD][/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]Duck[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]Dog[/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
As of my previous project, i had to use a formula that looks something like this:
'Retrieve data of the matched value in other column in another page (very messy I know)
={IF(ISERROR(INDEX(Data5!$B:$B,SMALL(IF($A$1=Data5!$A:$A,ROW(Data5!$A:$A)-ROW(Data5!$A$1)+1),COLUMN(B1)))),"",INDEX(Data5!$B:$B,SMALL(IF($A$1=Data5!$A:$A,ROW(Data5!$A:$A)-ROW(Data5!$A$1)+1),COLUMN(B1))))}
Honestly it is very messy and slow when it retrieves multiple data but I couldn't find any other way to make the code more consistent. Does anyone have any way with using formulas or even vba commands? I'm fine with any as long as the code does not go as long as above. If you have an idea for the the one shown in the example, do share! Any comments is well appreciated.
Thanks!