Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are close to my problem. What I am trying to do is if (Day Is 15) do this
I do not care what month or year are only the day. If day=15 b3=19.96 Looking thru and seen your entry so decided to throw out my problem Thanks "Gary''s Student" wrote: Say the date is in cell A1. In another cell enter: =DATE(YEAR(A1),MONTH(A1)+1,0) To do the same thing with VBA: Sub lastday() Dim d As Date d = Evaluate("DATE(YEAR(A1),MONTH(A1)+1,0)") MsgBox (d) End Sub -- Gary''s Student - gsnu200830 "JT" wrote: I have a date in a cell and want to find out what the last day for the month is. Is there an easy way to do this with VB and just include it with the rest of the code? Thanks for the help -- JT |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel to make the days cary over month to month automaticly | New Users to Excel | |||
Excel 2003 month to month data change grid | Excel Discussion (Misc queries) | |||
Retrieve data for previous 3, 6, 12 month given current month | Excel Worksheet Functions | |||
copy worksheet from previous month and rename to current month | Excel Programming | |||
transfer cell $ amount to other sheet month-to-month without overc | Excel Discussion (Misc queries) |