unknownymous
Board Regular
- Joined
- Sep 19, 2017
- Messages
- 249
- Office Version
- 2016
- Platform
- Windows
Hi Guys,
Can you possibly help me of how to code for this scenario:
Basically, I need to exclude the data not older than 4 years. However for the computation, the start date is not based from the current date but I want to set the date so a message box will pop asking me what is the starting date for computation.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Code[/TD]
[TD]Name[/TD]
[TD]Qty[/TD]
[TD]Date[/TD]
[TD]Source[/TD]
[/TR]
[TR]
[TD]001[/TD]
[TD]Ben[/TD]
[TD]500[/TD]
[TD]05/01/2010[/TD]
[TD]Book 1[/TD]
[/TR]
[TR]
[TD]002[/TD]
[TD]Len[/TD]
[TD]150[/TD]
[TD]05/01/2019[/TD]
[TD]Book 5[/TD]
[/TR]
[TR]
[TD]003[/TD]
[TD]Sean[/TD]
[TD]100[/TD]
[TD]05/01/2018[/TD]
[TD]Book 4[/TD]
[/TR]
[TR]
[TD]004[/TD]
[TD]Roan[/TD]
[TD]350[/TD]
[TD]05/01/2013[/TD]
[TD]Book 1[/TD]
[/TR]
</tbody>[/TABLE]
Result: Exclude Data More than 4 Years
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Code[/TD]
[TD]Name[/TD]
[TD]Qty[/TD]
[TD]Date [/TD]
[TD]Source[/TD]
[/TR]
[TR]
[TD]002[/TD]
[TD]Len[/TD]
[TD]150[/TD]
[TD]05/01/2019[/TD]
[TD]Book 5[/TD]
[/TR]
[TR]
[TD]003[/TD]
[TD]Sean[/TD]
[TD]100[/TD]
[TD]05/01/2018[/TD]
[TD]Book 4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Excluded[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]001[/TD]
[TD]Ben[/TD]
[TD]500[/TD]
[TD]05/01/2010[/TD]
[TD]Book 1[/TD]
[/TR]
[TR]
[TD]004[/TD]
[TD]Roan[/TD]
[TD]350[/TD]
[TD]05/01/2013[/TD]
[TD]Book 1[/TD]
[/TR]
</tbody>[/TABLE]
****** id="cke_pastebin" style="position: absolute; top: 115.764px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Book 1[/TD]
[/TR]
</tbody>[/TABLE]
</body>Any thoughts will be much appreciated.
Can you possibly help me of how to code for this scenario:
Basically, I need to exclude the data not older than 4 years. However for the computation, the start date is not based from the current date but I want to set the date so a message box will pop asking me what is the starting date for computation.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Code[/TD]
[TD]Name[/TD]
[TD]Qty[/TD]
[TD]Date[/TD]
[TD]Source[/TD]
[/TR]
[TR]
[TD]001[/TD]
[TD]Ben[/TD]
[TD]500[/TD]
[TD]05/01/2010[/TD]
[TD]Book 1[/TD]
[/TR]
[TR]
[TD]002[/TD]
[TD]Len[/TD]
[TD]150[/TD]
[TD]05/01/2019[/TD]
[TD]Book 5[/TD]
[/TR]
[TR]
[TD]003[/TD]
[TD]Sean[/TD]
[TD]100[/TD]
[TD]05/01/2018[/TD]
[TD]Book 4[/TD]
[/TR]
[TR]
[TD]004[/TD]
[TD]Roan[/TD]
[TD]350[/TD]
[TD]05/01/2013[/TD]
[TD]Book 1[/TD]
[/TR]
</tbody>[/TABLE]
Result: Exclude Data More than 4 Years
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Code[/TD]
[TD]Name[/TD]
[TD]Qty[/TD]
[TD]Date [/TD]
[TD]Source[/TD]
[/TR]
[TR]
[TD]002[/TD]
[TD]Len[/TD]
[TD]150[/TD]
[TD]05/01/2019[/TD]
[TD]Book 5[/TD]
[/TR]
[TR]
[TD]003[/TD]
[TD]Sean[/TD]
[TD]100[/TD]
[TD]05/01/2018[/TD]
[TD]Book 4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Excluded[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]001[/TD]
[TD]Ben[/TD]
[TD]500[/TD]
[TD]05/01/2010[/TD]
[TD]Book 1[/TD]
[/TR]
[TR]
[TD]004[/TD]
[TD]Roan[/TD]
[TD]350[/TD]
[TD]05/01/2013[/TD]
[TD]Book 1[/TD]
[/TR]
</tbody>[/TABLE]
****** id="cke_pastebin" style="position: absolute; top: 115.764px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Book 1[/TD]
[/TR]
</tbody>[/TABLE]
</body>Any thoughts will be much appreciated.