Referencing two lists and creating a third

singlefin

New Member
Joined
Oct 2, 2006
Messages
8
Hi

I am trying to reference two lists (on separate worksheets) and returning a value if certain criterias are met.

The first list is product number (column A) and quantity ordered (B), the second list shows product number (column A) and quantity shipped this year (column B).

I wnat Excel to look up these two lists and create a 3rd list, returning only the product number that meet the criterias that quantity shipped is greater than 500 and quantity on order is greater than 0.

The third list should contain columns for Product No., Quantity Shipped and Quantity on Order.

I've tried VLookup with embeded IF statements and I can't quite get it to work, as the forumla I tried will also return 0 or false from the IF statements.

Any help or pointers are highly appreciated.

Thanks
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Erdinç E. Karaçam

Board Regular
Joined
Sep 23, 2006
Messages
202
Hi,

For example; "first list" sheet is like this:

<table border=1><tr><td align=left valign=center><font size=1 color=red face=verdana>Gönderen XL Ver.:</font><font size=1 face=verdana> Office 2003 / </font><font size=1 color=red face=verdana>OS Ver.:</font><font size=1 face=verdana> Windows XP </font></td></tr><tr valign=top><td><table border=0 bgcolor=d4d0c8 cellspacing=1 cellpadding=1 align=center><tr align=center valign=center bgcolor=white><td bgcolor=d4d0c8 align=center><font color=black size=2>+</font></td><td bgcolor=d4d0c8 width=60><font color=black size=1 face=verdana>A</font></td><td bgcolor=d4d0c8 width=60><font color=black size=1 face=verdana>B</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>1</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>product number</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>quantity ordered</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>2</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 01</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>0</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>3</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 02</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>5</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>4</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 03</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>9</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>5</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 04</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>0</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>6</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 05</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>17</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>7</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 06</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>0</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>8</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 07</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>25</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>9</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 08</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>0</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>10</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 09</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>0</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>11</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 10</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>37</font></td></tr></table></td></tr><tr><td bgcolor=f0f8ff align=center><font color=black size=1 face=verdana>XLtoHTML v1.1 / ExcelTürkiye - 2006©</font></td></tr></table>


Then,

"second list" sheet is like this:

<table border=1><tr><td align=left valign=center><font size=1 color=red face=verdana>Gönderen XL Ver.:</font><font size=1 face=verdana> Office 2003 / </font><font size=1 color=red face=verdana>OS Ver.:</font><font size=1 face=verdana> Windows XP </font></td></tr><tr valign=top><td><table border=0 bgcolor=d4d0c8 cellspacing=1 cellpadding=1 align=center><tr align=center valign=center bgcolor=white><td bgcolor=d4d0c8 align=center><font color=black size=2>+</font></td><td bgcolor=d4d0c8 width=60><font color=black size=1 face=verdana>A</font></td><td bgcolor=d4d0c8 width=60><font color=black size=1 face=verdana>B</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>1</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>product number</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>quantity shipped this year</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>2</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 01</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>485</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>3</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 02</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>495</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>4</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 03</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>505</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>5</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 04</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>515</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>6</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 05</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>525</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>7</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 06</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>335</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>8</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 07</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>545</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>9</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 08</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>555</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>10</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 09</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>465</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>11</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 10</font></td><td bgcolor=white nowrap=true align=right><font size=1 color=black face=verdana>575</font></td></tr></table></td></tr><tr><td bgcolor=f0f8ff align=center><font color=black size=1 face=verdana>XLtoHTML v1.1 / ExcelTürkiye - 2006©</font></td></tr></table>


And, "3rd list" is like this:

<table border=1><tr><td align=left valign=center><font size=1 color=red face=verdana>Gönderen XL Ver.:</font><font size=1 face=verdana> Office 2003 / </font><font size=1 color=red face=verdana>OS Ver.:</font><font size=1 face=verdana> Windows XP </font></td></tr><tr valign=top><td><table border=0 bgcolor=d4d0c8 cellspacing=1 cellpadding=1 align=center><tr align=center valign=center bgcolor=white><td bgcolor=d4d0c8 align=center><font color=black size=2>+</font></td><td bgcolor=d4d0c8 width=60><font color=black size=1 face=verdana>A</font></td><td bgcolor=d4d0c8 width=60><font color=black size=1 face=verdana>B</font></td><td bgcolor=d4d0c8 width=60><font color=black size=1 face=verdana>C</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>1</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>product number</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>quantity shipped</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>quantity ordered</font></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>2</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 01</font></td><td bgcolor=white></td><td bgcolor=white></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>3</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 02</font></td><td bgcolor=white></td><td bgcolor=white></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>4</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 03</font></td><td bgcolor=white></td><td bgcolor=white></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>5</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 04</font></td><td bgcolor=white></td><td bgcolor=white></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>6</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 05</font></td><td bgcolor=white></td><td bgcolor=white></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>7</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 06</font></td><td bgcolor=white></td><td bgcolor=white></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>8</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 07</font></td><td bgcolor=white></td><td bgcolor=white></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>9</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 08</font></td><td bgcolor=white></td><td bgcolor=white></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>10</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 09</font></td><td bgcolor=white></td><td bgcolor=white></td></tr><tr align=left bgcolor=white height=20><td align=center valign=center bgcolor=d4d0c8 width=10><font color=black size=1 face=verdana>11</font></td><td bgcolor=white nowrap=true><font size=1 color=black face=verdana>PN 10</font></td><td bgcolor=white></td><td bgcolor=white></td></tr></table></td></tr><tr><td bgcolor=f0f8ff align=center><font color=black size=1 face=verdana>XLtoHTML v1.1 / ExcelTürkiye - 2006©</font></td></tr></table>


On 3rd list sheet, B2 cell formula is: (FillDown)
Code:
=IF(AND('first list'!B2>0;'second list'!B2>500);'second list'!B2;"")

On 3rd list sheet, C2 cell formula is: (FillDown)
Code:
=IF(AND('first list'!B2>0;'second list'!B2>500);'first list'!B2;"")

Is it Ok.?
 

Forum statistics

Threads
1,136,266
Messages
5,674,722
Members
419,521
Latest member
Jasonnie

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
Top