Quantcast
Channel: Active questions tagged worksheet-function - Super User
Viewing all articles
Browse latest Browse all 936

Excel Index(Small(IF Issue

$
0
0

I'm looking to improve a formulas. The formula is:

=IFERROR(INDEX(IndexColumn,SMALL(IF(MilestoneColumn=TODAY(),ROW(MilestoneColumn)-ROW(MilestoneColumnFirstCellLocked)+1),ROWS(MilestoneColumnFirstCellLocked:FirstCellUnlocked))),"")

My issue is that this returns the index column value for index values that have the assigned milestone date for today. However, I would like to have the index value appear when the milestone date equals today or yesterday or past dates where the adjacent status value is "P" projected.

When I use the =OR() function it does not work. I've tried placing OR() after the IF() function and before. I've tried multiple scenarios. The only progress I have had is by using VLOOKUP() paired with an IF() formula on whether adjacent cell has "P" projected status.

Such as:

=IFERROR(IF(VLOOKUP(INDEX(Utilities'!$E$5:$E$135,SMALL(IF(Utilities'!$O$5:$O$135<=TODAY(),ROW(Utilities'!$O$5:$O$135)-ROW(Utilities'!$O$5)+1),ROWS(Utilities'!$O$5:$O5))),Utilities'!$E:$P,12,0)="P",IFERROR(INDEX(Utilities'!$E$5:$E$135,SMALL(IF(Utilities'!$O$5:$O$135<=TODAY(),ROW(Utilities'!$O$5:$O$135)-ROW(Utilities'!$O$5)+1),ROWS(Utilities'!$O$5:$O5))),""),""),"")

The only issue with this approach is it pulls incorrect data as it gets further down the dashboard column and it populates/stacks the index column values with blank cells between populated cells.

I have milestones managed by dates and an adjacent status column. My goal is to pull what in row/cell has a date today or prior and has a "P" in adjacent status column - just need a cleaner way to do this.


Viewing all articles
Browse latest Browse all 936

Trending Articles