islandexcel8
New Member
- Joined
- Jul 31, 2017
- Messages
- 3
Hello,
I'm looking into creating an simpler equation without using VBA for the following:
I have a list of columns with dates as the heading. The user inserts the quantity of parts in which ever column the due date would be, say for the 21-May-18. I have a cell column that would return the value for this date.
However, say they now add another quantity within the same row of data, but on the 30-April-18 column, the cell column should return the earliest date of all of them. In this case it should return 30-April-18. (see my table below for this example- 3rd row)
I'm looking for an equation that would search all the dates and return the earliest date value if that cell is fill out (as seen in the table).
So far, I have thought of this complex if statement, but I would like to simplify it in the case I need to add more date columns, maybe a VLookup/HLookup?.
The equation I have is as follows:
=IF(AQ16<>"",$AQ$1,IF(AR16<>"",$AR$1,IF(AS16<>"",$AS$1,IF(AT16<>"",$AT$1,IF(AU16<>"",$AU$1,IF(AV16<>"",$AV$1,IF(AW16<>"",$AW$1,IF(AX16<>"",$AX$1,IF(AY16<>"",$AY$1,"N/A")))))))))
Any help would be greatly appreciated
[TABLE="class: grid, width: 372"]
<colgroup><col><col span="9"></colgroup><tbody>[TR]
[TD]Return Date[/TD]
[TD]23-Apr-18[/TD]
[TD]30-Apr-18[/TD]
[TD]7-May-18[/TD]
[TD]14-May-18[/TD]
[TD]21-May-18[/TD]
[TD]28-May-18[/TD]
[TD]4-Jun-18[/TD]
[TD]11-Jun-18[/TD]
[TD]18-Jun-18[/TD]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[TD]21-May- 18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]30-Apr-18[/TD]
[TD] [/TD]
[TD]200[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]400[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]30-Apr-18[/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]14-May-18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]14-May-18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]14-May-18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]14-May-18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]23-Apr-18[/TD]
[TD]60[/TD]
[TD]60[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
I'm looking into creating an simpler equation without using VBA for the following:
I have a list of columns with dates as the heading. The user inserts the quantity of parts in which ever column the due date would be, say for the 21-May-18. I have a cell column that would return the value for this date.
However, say they now add another quantity within the same row of data, but on the 30-April-18 column, the cell column should return the earliest date of all of them. In this case it should return 30-April-18. (see my table below for this example- 3rd row)
I'm looking for an equation that would search all the dates and return the earliest date value if that cell is fill out (as seen in the table).
So far, I have thought of this complex if statement, but I would like to simplify it in the case I need to add more date columns, maybe a VLookup/HLookup?.
The equation I have is as follows:
=IF(AQ16<>"",$AQ$1,IF(AR16<>"",$AR$1,IF(AS16<>"",$AS$1,IF(AT16<>"",$AT$1,IF(AU16<>"",$AU$1,IF(AV16<>"",$AV$1,IF(AW16<>"",$AW$1,IF(AX16<>"",$AX$1,IF(AY16<>"",$AY$1,"N/A")))))))))
Any help would be greatly appreciated
[TABLE="class: grid, width: 372"]
<colgroup><col><col span="9"></colgroup><tbody>[TR]
[TD]Return Date[/TD]
[TD]23-Apr-18[/TD]
[TD]30-Apr-18[/TD]
[TD]7-May-18[/TD]
[TD]14-May-18[/TD]
[TD]21-May-18[/TD]
[TD]28-May-18[/TD]
[TD]4-Jun-18[/TD]
[TD]11-Jun-18[/TD]
[TD]18-Jun-18[/TD]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[TD]21-May- 18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]30-Apr-18[/TD]
[TD] [/TD]
[TD]200[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]400[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]30-Apr-18[/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]14-May-18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]14-May-18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]14-May-18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]14-May-18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]23-Apr-18[/TD]
[TD]60[/TD]
[TD]60[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]50[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]