Vlookup to create report

bmpreston

Board Regular
Joined
Jun 18, 2016
Messages
120
Office Version
  1. 365
Platform
  1. MacOS
Looking to pull a range of a VLOOKUP if a value exists.

Pull this to a dynamic report from multiple sheets onto one consolidated sheet.

Please see the example:

[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]Text[/TD]
[TD]text[/TD]
[TD]text[/TD]
[TD]value to match[/TD]
[/TR]
[TR]
[TD]foo[/TD]
[TD]foo[/TD]
[TD]foo[/TD]
[TD]-1[/TD]
[/TR]
[TR]
[TD]bar[/TD]
[TD]bar[/TD]
[TD]bar[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]foobar1[/TD]
[TD]foobar1[/TD]
[TD]foobar1[/TD]
[TD]-2[/TD]
[/TR]
[TR]
[TD]helloworld[/TD]
[TD]helloworld[/TD]
[TD]helloworld[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]

John Snow <--worksheet name

[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]text[/TD]
[TD]text[/TD]
[TD]text[/TD]
[TD]value to match[/TD]
[/TR]
[TR]
[TD]foobar1[/TD]
[TD]foobar1[/TD]
[TD]foobar1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]anothervalue[/TD]
[TD]anothervalue[/TD]
[TD]anothervalue[/TD]
[TD]-4[/TD]
[/TR]
[TR]
[TD]something[/TD]
[TD]something[/TD]
[TD]something[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]more[/TD]
[TD]more[/TD]
[TD]more[/TD]
[TD]-2[/TD]
[/TR]
</tbody>[/TABLE]

Elon Musk <--worksheet name


This is two example sheets of 12 in a workbook.

I need to put the name of the worksheet in a cell; add a few rows for gaps; then bring over the rows with a negative number; few rows, then the new worksheet name; then that sheet's negative values.


The Results would look like this:

[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]John Snow[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]foo[/TD]
[TD]foo[/TD]
[TD]foo[/TD]
[TD]-1[/TD]
[/TR]
[TR]
[TD]foobar1[/TD]
[TD]foobar1[/TD]
[TD]foobar1[/TD]
[TD]-2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Elon Musk[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]anothervalue[/TD]
[TD]anothervalue[/TD]
[TD]anothervalue[/TD]
[TD]-4[/TD]
[/TR]
[TR]
[TD]more[/TD]
[TD]more[/TD]
[TD]more[/TD]
[TD]-2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



Thanks!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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