If Activecell = Last Day of month Then Run a Loop

RyanTG

New Member
Joined
Nov 29, 2015
Messages
42
Hi VBA ninjas!

Is it possible to run a loop based on this?


If Activecell = Last Day of Month


1. Excel 2010; Windows 7 Pro

2. PC
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
What do you want to loop?

Are you trying to find the last day of the month in a column/row/range?
 
Upvote 0
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC; font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #ccc;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style>
<table class="tableizer-table">
<tr class="tableizer-firstrow"><th>Mon, Dec 28</th><th>101</th><th>Old Gm</th><th>?</th><th>101</th><th>30.7%</th><th>49</th><th>70</th><th>0</th><th>5</th><th>16</th><th>10</th><th>0</th><th>0</th><th>0</th></tr>
<tr><td>Tue, Dec 29</td><td>100</td><td>Old Gm</td><td>?</td><td>98</td><td>15.3%</td><td>39</td><td>83</td><td>0</td><td>1</td><td>9</td><td>5</td><td>2</td><td>1</td><td>1</td></tr>
<tr><td>Wed, Dec 30</td><td>22</td><td>Old Gm</td><td>1</td><td>17</td><td>35.3%</td><td>6</td><td>11</td><td>0</td><td>2</td><td>3</td><td>1</td><td>5</td><td>5</td><td>0</td></tr>
<tr><td>Thu, Dec 31</td><td>30</td><td>Old Gm</td><td>2</td><td>30</td><td>30.0%</td><td>13</td><td>21</td><td>0</td><td>1</td><td>7</td><td>1</td><td>0</td><td>0</td><td>0</td></tr>
<tr><td>Totals</td><td>449</td><td> </td><td>3</td><td>401</td><td>33.2%</td><td>188</td><td>268</td><td>4</td><td>19</td><td>81</td><td>33</td><td>48</td><td>35</td><td>13</td></tr>
<tr><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr><td>Mon, Jan 04</td><td>62</td><td>Old Gm</td><td>4</td><td>60</td><td>25.0%</td><td>25</td><td>45</td><td>0</td><td>2</td><td>9</td><td>4</td><td>2</td><td>1</td><td>1</td></tr>
<tr><td>Tue, Jan 05</td><td>64</td><td>Old Gm</td><td>4</td><td>59</td><td>27.1%</td><td>21</td><td>43</td><td>0</td><td>5</td><td>6</td><td>5</td><td>5</td><td>5</td><td>0</td></tr>
<tr><td>Wed, Jan 06</td><td>100</td><td>Old Gm</td><td>6</td><td>97</td><td>28.9%</td><td>40</td><td>69</td><td>0</td><td>2</td><td>15</td><td>11</td><td>3</td><td>1</td><td>2</td></tr>
</table>
 
Upvote 0
In Column A I am trying to say:

If Activecell.value= Last Day in Month then....
 
Upvote 0
So are you looping down column A?
 
Upvote 0
Although I could do that, I am saying range.("a100000").end(xlup).select

Then If Activecell.value= Last Day in Month
 
Upvote 0
Excel Workbook
ABCDEFG
80Tue, Jan 2674Old Gm17028.6%40
81Wed, Jan 275?0520.0%2
82Thu, Jan 28100Old Gm09825.5%43
83Fri, Jan 299?0825.0%4
Stats
 
Upvote 0
Why not use Subtotals? Or put your data in a table and summarize with a Pivot Table?
 
Upvote 0

Forum statistics

Threads
1,215,520
Messages
6,125,301
Members
449,218
Latest member
Excel Master

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