combination vlookup & hlookup

Kevinlzh

New Member
Joined
Sep 21, 2017
Messages
3
Guys, I need urgent help with converting of the below raw data into the below format of data to be presented. I am open to all other methods, not necessarily using vlookup/hlookup.

Thank you.

(Raw data)
[TABLE="class: grid, width: 200, align: left"]
<tbody>[TR]
[TD]Fruit[/TD]
[TD]Year[/TD]
[TD]Price($)[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]2014[/TD]
[TD]1.32[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]2016[/TD]
[TD]1.49[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]2017[/TD]
[TD]1.55[/TD]
[/TR]
[TR]
[TD]Pear[/TD]
[TD]2013[/TD]
[TD]1.48[/TD]
[/TR]
[TR]
[TD]Pear[/TD]
[TD]2015[/TD]
[TD]1.60[/TD]
[/TR]
[TR]
[TD]Pear[/TD]
[TD]2017[/TD]
[TD]1.29[/TD]
[/TR]
</tbody>[/TABLE]


(Format to be presented)
[TABLE="class: grid, width: 200, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]2013[/TD]
[TD]2014[/TD]
[TD]2015[/TD]
[TD]2016[/TD]
[TD]2017[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]na[/TD]
[TD]$1.32[/TD]
[TD]na[/TD]
[TD]$1.49[/TD]
[TD]$1.55[/TD]
[/TR]
[TR]
[TD]Pear[/TD]
[TD]$1.48[/TD]
[TD]na[/TD]
[TD]$1.60[/TD]
[TD]na[/TD]
[TD]$1.29[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Assuming your raw data is in cells A1:C7 and your 2nd table is in A9:F11, enter the below (confirm with ctrl+shift+enter)
=INDEX($C$2:$C$7,MATCH($A10&B$9,$A$2:$A$7&$B$2:$B$7,0))
 
Upvote 0
Assuming your raw data is in cells A1:C7 and your 2nd table is in A9:F11, enter the below (confirm with ctrl+shift+enter)
=INDEX($C$2:$C$7,MATCH($A10&B$9,$A$2:$A$7&$B$2:$B$7,0))

Wow you are a lifesaver! Thank you so so much!:)
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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