bjornishungry
New Member
- Joined
- Jun 3, 2011
- Messages
- 4
Hi! I'm looking to create a formula for a contest spreadsheet that will tell if a given contest winner has won anything in the last 30 days (if so, they are ineligible to win until a month has passed and a cell in the spreadsheet should reflect that). It seems like a fairly complex formula would be required to do this, so I've created a column for each prize to reflect whether it was won in the past 30 days. An idea I had was to have this column in 0's and 1's, and sum the total for each winner (if sum>0 ineligible else eligible). There's still several issues that need to be resolved in addition to finding a working formula to do this: excluding the current row from consideration (my idea was setting the period 1-30 days as opposed to 0-30 days), and making the formula work for a variable number of columns. I'm stuck on the nested IF statement to return the multiple corresponding eligibility cells by winner name. Another issue then is whether the spreadsheet would be too slow when a large number of winners are stored in it. Help would be appreciated!
>30 Days formula (working):
=IF(DATEDIF(Date,NOW(),"D")<30,"N","Y")
<table border="0" cellpadding="0" cellspacing="0" width="256"><colgroup><col style="width:48pt" width="64"> <col style="width:48pt" span="3" width="64"> </colgroup><tbody><tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt;width:48pt" height="17" width="64">Date</td> <td style="width:48pt" width="64">Name</td> <td style="width:48pt" width="64">Eligible?</td> <td style="width:48pt" width="64">>30 Days?</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">5/14/11</td> <td>Smith</td> <td>N
</td> <td>N</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">5/9/11</td> <td>Anderson</td> <td>N
</td> <td>N</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">4/21/11</td> <td>Johnson</td> <td>Y
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" height="17">
</td> <td>
</td> <td>
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" height="17">
</td> <td>
</td> <td>
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">11/8/10</td> <td>Smith</td> <td>N
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">9/15/10</td> <td>Johnson</td> <td>Y
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" height="17">
</td> <td>
</td> <td>
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">1/28/11</td> <td>Brown</td> <td>Y
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">2/17/11</td> <td>Smith</td> <td>N
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">6/1/11</td> <td>Anderson</td> <td>N
</td> <td>N</td> </tr> </tbody></table>
Hope I've explained my question clearly enough, let me know if anything needs more clarification.
Edit: the spreadsheet is designed to be used by many different people, so I wish to avoid changing settings in Excel that would make the formula work on one computer but not on others.
>30 Days formula (working):
=IF(DATEDIF(Date,NOW(),"D")<30,"N","Y")
<table border="0" cellpadding="0" cellspacing="0" width="256"><colgroup><col style="width:48pt" width="64"> <col style="width:48pt" span="3" width="64"> </colgroup><tbody><tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt;width:48pt" height="17" width="64">Date</td> <td style="width:48pt" width="64">Name</td> <td style="width:48pt" width="64">Eligible?</td> <td style="width:48pt" width="64">>30 Days?</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">5/14/11</td> <td>Smith</td> <td>N
</td> <td>N</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">5/9/11</td> <td>Anderson</td> <td>N
</td> <td>N</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">4/21/11</td> <td>Johnson</td> <td>Y
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" height="17">
</td> <td>
</td> <td>
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" height="17">
</td> <td>
</td> <td>
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">11/8/10</td> <td>Smith</td> <td>N
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">9/15/10</td> <td>Johnson</td> <td>Y
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" height="17">
</td> <td>
</td> <td>
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">1/28/11</td> <td>Brown</td> <td>Y
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">2/17/11</td> <td>Smith</td> <td>N
</td> <td>Y</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl24" style="height:12.75pt" align="right" height="17">6/1/11</td> <td>Anderson</td> <td>N
</td> <td>N</td> </tr> </tbody></table>
Hope I've explained my question clearly enough, let me know if anything needs more clarification.
Edit: the spreadsheet is designed to be used by many different people, so I wish to avoid changing settings in Excel that would make the formula work on one computer but not on others.
Last edited: