Re: Showing first day of the next month in a column ...
- From: "StargateFanFromWork" <NoSpam@xxxxxxxxxx>
- Date: Tue, 29 May 2007 11:38:12 -0400
"JE McGimpsey" <jemcgimpsey@xxxxxxxx> wrote in message
news:jemcgimpsey-D69FFF.09012529052007@xxxxxxxxxxxxxxxxxxxxxxx
Both should work fine.
The first always refers to the date in B2, then creates an offset based
on the row that the formula is in. The second creates a relative
reference to the cell above.
Oh, yes. I should have mentioned that I understood re the absolute
references in $ symbol. Thanks for figuring out that I meant the
differences in the formula itself and not that part <vbg>.
The main advantage of the second formula is it's a bit more efficient -
one less function call (don't waste the millisecond or two by
blinking...). A second advantage is that it's slightly easier to
<lol>
interpret, making it perhaps easier to maintain.
A possible advantage of the first formula is that if you insert a blank
row, the formulas below that row will continue to calculate months based
on B2 (though with a skipped month). This could also be a disadvantage,
depending on your application (i.e., giving a possibly erroneous date
that looks reasonable)
None are especially compelling reasons to pick one over the other, but
my sense of aesthetics would pick the 2nd.
Ah, good enough for me. I may make decisions based on that, too, along with
the consideration of the elegancy of some code over another when they do
pretty much the same thing.
Thanks! :oD
In article <uqgFvtfoHHA.4032@xxxxxxxxxxxxxxxxxxxx>,
"StargateFanFromWork" <NoSpam@xxxxxxxxxx> wrote:
Is there any advantage in using one formula over the other? i.e.,
B3: =DATE(YEAR($B$2),MONTH($B$2)+ROWS($1:1),1)
vs.
B3: =DATE(YEAR(B2),MONTH(B2)+1,1)
I tried the =DATE(YEAR(B2),MONTH(B2)+1,1) and that works but was
wondering
about the first formula.
.
- References:
- Showing first day of the next month in a column ...
- From: StargateFanFromWork
- Re: Showing first day of the next month in a column ...
- From: Ron Rosenfeld
- Re: Showing first day of the next month in a column ...
- From: StargateFanFromWork
- Re: Showing first day of the next month in a column ...
- From: JE McGimpsey
- Showing first day of the next month in a column ...
- Prev by Date: Excel Formatting to look like Project
- Next by Date: connect to quickbooks
- Previous by thread: Re: Showing first day of the next month in a column ...
- Next by thread: Re: Showing first day of the next month in a column ...
- Index(es):
Relevant Pages
|