Vlookup and transpose the attributes as headers

Parvathy

New Member
Joined
Oct 18, 2021
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Hi All ,

I am facing an issue with an excel automation .

I have the following excel Sheet …

idxGroupFamilyQuantityAudit comments y/n
1​
AppleRed
100​
2​
AppleGreen
20​
3​
OrangeMandarin
100​
4​
OrangeTangerine
88​
5​
PineappleBrecheche
60​
6​
PineappleQueen
70​
7​
AppleGala
44​

and another work book which consists of auditing attributes for each fruits category

Group auditAudit variations
OrangeSize
OrangeColor
OrangeNumber_Of_Items
AppleQuantity
Applevariations
AppleFamily
AppleDefect
PineappleSize
PineappleFirmness
PineappleSpecial_Feature
PineappleFamily
Pineapplecolor
Watermelonripeness
WatermelonHeaviness
WatermelonFamily
Watermelonweight

And I want to the following result into another excel sheet

idxGroupFamilyQuantityAudit comments y/nQuantityvariationsFamilyDefect
1​
AppleRed
100​
2​
AppleGreen
20​
3​
AppleMandarin
100​
4​
Apple
Tangerine
88​
5​
Apple
Brecheche
60​
6​
Apple
Queen
70​
7​
AppleGala
44​

Right now, I am manually doing a lookup on the group category of the first data frame with the "group Audit " column on the second. Afterward doing a transpose on the audit variation based on the Group Type.Is there any way to automate this process?

This would save a lot of time. Suggestions are welcomed.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi Parvathy,

is this the logic you are looking at.

Vlookup to Map.xlsx
ABCDEFGHIJKLMNOPQRSTU
1idxGroupFamilyQuantityAudit comments y/nColorDefectFamilyFirmnessHeavinessNumber_Of_ItemsQuantityripenessSizeSpecial_Featurevariationsweight    
21AppleRed100Y011000100010    
32AppleGreen20                
43OrangeMandarin100Y100001001000    
54OrangeTangerine88                
65PineappleBrecheche60                
76PineappleQueen70Y101100001100    
87AppleGala44                
Sheet1
Cell Formulas
RangeFormula
F1:U1F1=IFERROR(TRANSPOSE(INDEX(Sheet2!$B$2:$B$17, MATCH(SMALL(IF(COUNTIF($E$1:E$1, Sheet2!$B$2:$B$17)=0, COUNTIF(Sheet2!$B$2:$B$17, "<"&Sheet2!$B$2:$B$17), ""), 1), COUNTIF(Sheet2!$B$2:$B$17, "<"&Sheet2!$B$2:$B$17), 0))),"")
F2:U8F2=IF(AND($E2="Y",F$1<>""),COUNTIFS(Sheet2!$A:$A,$B2,Sheet2!$B:$B,F$1),"")
 
Upvote 0
Hi Parvathy,

is this the logic you are looking at.

Vlookup to Map.xlsx
ABCDEFGHIJKLMNOPQRSTU
1idxGroupFamilyQuantityAudit comments y/nColorDefectFamilyFirmnessHeavinessNumber_Of_ItemsQuantityripenessSizeSpecial_Featurevariationsweight    
21AppleRed100Y011000100010    
32AppleGreen20                
43OrangeMandarin100Y100001001000    
54OrangeTangerine88                
65PineappleBrecheche60                
76PineappleQueen70Y101100001100    
87AppleGala44                
Sheet1
Cell Formulas
RangeFormula
F1:U1F1=IFERROR(TRANSPOSE(INDEX(Sheet2!$B$2:$B$17, MATCH(SMALL(IF(COUNTIF($E$1:E$1, Sheet2!$B$2:$B$17)=0, COUNTIF(Sheet2!$B$2:$B$17, "<"&Sheet2!$B$2:$B$17), ""), 1), COUNTIF(Sheet2!$B$2:$B$17, "<"&Sheet2!$B$2:$B$17), 0))),"")
F2:U8F2=IF(AND($E2="Y",F$1<>""),COUNTIFS(Sheet2!$A:$A,$B2,Sheet2!$B:$B,F$1),"")
Hi Ravi
Than you for responding.

However i only need the attributes as headers without any values. Sorry, if i didn't made it clear in the previous post.The values will be entered by auditors.


Input File

idxGroupFamilyQuantityAudit comments y/n
1​
AppleFuji
100​
2​
AppleGala
20​
3​
AppleHoneycrisp
100​
4​
AppleBrecheche
88​
5​
AppleMcIntosh
60​
6​
AppleGala
70​
7​
AppleGala
44​

Audit File :
Group auditAudit variations
OrangeSize
OrangeColor
OrangeNumber_Of_Items
AppleQuantity
Applevariations
AppleFamily
AppleDefect
PineappleSize
PineappleFirmness
PineappleSpecial_Feature
PineappleFamily
Pineapplecolor
Watermelonripeness
WatermelonHeaviness
WatermelonFamily
Watermelonweight



Out file should look like:
idxGroupFamilyQuantityAudit comments y/nQuantityvariationsFamilyDefect
1​
AppleFuji
100​
2​
AppleGala
20​
3​
AppleHoneycrisp
100​
4​
AppleBrecheche
88​
5​
AppleMcIntosh
60​
6​
AppleGala
70​
7​
AppleGala
44​

For example:

If the sheet contains only apple Group then ,audit attributes corresponding to Apple should be coming up in output data.

Once again thank you for your promt response.:)
 
Upvote 0
Hi Ravi
Than you for responding.

However i only need the attributes as headers without any values. Sorry, if i didn't made it clear in the previous post.The values will be entered by auditors.


Input File

idxGroupFamilyQuantityAudit comments y/n
1​
AppleFuji
100​
2​
AppleGala
20​
3​
AppleHoneycrisp
100​
4​
AppleBrecheche
88​
5​
AppleMcIntosh
60​
6​
AppleGala
70​
7​
AppleGala
44​

Audit File :
Group auditAudit variations
OrangeSize
OrangeColor
OrangeNumber_Of_Items
AppleQuantity
Applevariations
AppleFamily
AppleDefect
PineappleSize
PineappleFirmness
PineappleSpecial_Feature
PineappleFamily
Pineapplecolor
Watermelonripeness
WatermelonHeaviness
WatermelonFamily
Watermelonweight



Out file should look like:
idxGroupFamilyQuantityAudit comments y/nQuantityvariationsFamilyDefect
1​
AppleFuji
100​
2​
AppleGala
20​
3​
AppleHoneycrisp
100​
4​
AppleBrecheche
88​
5​
AppleMcIntosh
60​
6​
AppleGala
70​
7​
AppleGala
44​

For example:

If the sheet contains only apple Group then ,audit attributes corresponding to Apple should be coming up in output data.

Once again thank you for your promt response.:)
I think then you can use only the first formula to get the data

=IFERROR(TRANSPOSE(INDEX(Sheet2!$B$2:$B$17, MATCH(SMALL(IF(COUNTIF($E$1:E$1, Sheet2!$B$2:$B$17)=0, COUNTIF(Sheet2!$B$2:$B$17, "<"&Sheet2!$B$2:$B$17), ""), 1), COUNTIF(Sheet2!$B$2:$B$17, "<"&Sheet2!$B$2:$B$17), 0))),"")
 
Upvote 0
Hi Ravi,

I am getting blank ouput when trying to enter the formula. I am not sure what mistake i made in this .

1634543572577.png
 
Upvote 0
In your Sheet Name, it is written as Sheet 2 and in my Sheet, it is written as Sheet2 there is a space between the words in your sheet


You can Check the both SS
does the solution work for you
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

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