Index items if value in one coulum is zero but in other date (coulum) have value

Rsdg

New Member
Joined
Jul 7, 2022
Messages
15
Office Version
  1. 2016
Platform
  1. Windows
Hello and thanks for your help
I have two sheets with different date , i want to return items if in one sheets have value and the other with zero
And i have some condition like this picture
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    173.7 KB · Views: 11

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I mean, if 100304625 is 166 in November, is it always 166 in October? Otherwise there would be meaningless since there will be a small probability that each can match with the given codes above.
 
Upvote 0
I mean, if 100304625 is 166 in November, is it always 166 in October? Otherwise there would be meaningless since there will be a small probability that each can match with the given codes above.
Yes, I got it wrong, and it is possible that an item will not exist at all in the next month

In a my data, I am looking for items that did not exist in the previous month or were zero, but have a value in the new month or vice versa
 
Upvote 0
INDEXeptioooon! K5:
Excel Formula:
=IF(COUNTIF($B$1:$F$1,VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$G$5:$I$20,2,0))>0,IF(OR(AND(VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$A$5:$C$20,3,0)=0,VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$G$5:$I$20,3,0)>0),AND(VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$A$5:$C$20,3,0)>0,VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$G$5:$I$20,3,0)=0)),INDEX(A$5:A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),""),"")
This is an array formula. Hitting Enter is not enough. Press Ctrl+Shift+Enter after paste. Drag down and left.

Edit: I see your reply now. I added October code check also. It is too late to remove :)
 
Last edited by a moderator:
Upvote 0
OK,

I removed October code check. Now it checks code only for November. If it's OK, then OK.
Excel Formula:
=IFERROR(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$G$5:$I$20,2,0))>0,IF(OR(AND(VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$A$5:$C$20,3,0)=0,VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$G$5:$I$20,3,0)>0),AND(VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$A$5:$C$20,3,0)>0,VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$G$5:$I$20,3,0)=0)),INDEX(A$5:A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),""),"")
 
Upvote 0
Solution
OK,

I removed October code check. Now it checks code only for November. If it's OK, then OK.
Excel Formula:
=IFERROR(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$G$5:$I$20,2,0))>0,IF(OR(AND(VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$A$5:$C$20,3,0)=0,VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$G$5:$I$20,3,0)>0),AND(VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$A$5:$C$20,3,0)>0,VLOOKUP(INDEX($A$5:$A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),$G$5:$I$20,3,0)=0)),INDEX(A$5:A$20,SMALL(IF($B$5:$B$20=$B$1:$F$1,ROW($A$1:$A$16)),ROWS($A$1:A1))),""),"")
Thank you, it really helped me
 
Upvote 0
Glad it did work 👍 Thanks for the feedback. Maybe a shorter formula is possible but this is what I came up with.
 
Upvote 0

Forum statistics

Threads
1,215,129
Messages
6,123,218
Members
449,091
Latest member
jeremy_bp001

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