vlookup for only column with values

bmpreston

Board Regular
Joined
Jun 18, 2016
Messages
120
Office Version
  1. 365
Platform
  1. MacOS
So I'm trying to use a vlookup to check a table of a few values, and only print the numbers if the value is more than zero.

Column A returns the value in Column C IF Column D is at least 1 or higher.

If Column D is zero, Column A skips the Column C value.

I have approx 3000 rows to validate. The copying of the formula is of course quite easy. Just need the base formula.

Thanks in advance.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Blank[/TD]
[TD]Column C[/TD]
[TD]Column D[/TD]
[/TR]
[TR]
[TD]NEEDED FORMULA (1000)[/TD]
[TD][/TD]
[TD]1000[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Needed formula (1001)[/TD]
[TD][/TD]
[TD]1001[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Needed Formula (1003) (SKIPS 1002)[/TD]
[TD][/TD]
[TD]1002[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Needed Formula (1004)[/TD]
[TD][/TD]
[TD]1003[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Needed Formula (1006) (Skips over 1005)[/TD]
[TD][/TD]
[TD]1004[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Needed Formula (Etc)[/TD]
[TD][/TD]
[TD]1005[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Needed Formula (Etc)[/TD]
[TD][/TD]
[TD]1006[/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]
</tbody>[/TABLE]
 
Last edited:
That does provide a value from the U column, but is one value before the row with a value higher than 0.

I get U4 when Z4 is zero, although Z5 is NOT 0

I am hoping to get U5, since Z5 is NOT 0.

Thanks
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
In your initial explanation, everything was starting in Row 2 ...

In your actual workbook, everything starts in Row 3 ...

As a consequence, you should keep the consistency ... and make sure to define your Named Range ...starting in Row 3 ...

HTH
 
Upvote 0
Awesome. I seem to be working. Thanks a bunch. Nothing like late night coding for the boss...;-)
 
Upvote 0
In A1 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($C$1:$C$7,SMALL(IF(ISNUMBER($D$1:$D$7),IF($D$1:$D$7>0,ROW($C$1:$C$7)-ROW($C$1)+1)),ROWS($A$1:A1))),"")
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,123
Members
452,381
Latest member
Nova88

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