Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pick date and month?
Hi All -
Could you please help me on this? In a worksheet "A" column containing birthdays(date, dd/mm/yyyy). How can I write a code to show date & month("A" column) matching with todays date & month in the respective "B" column.? Thanks a lot in advance for your helps... Ratheesh |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pick date and month?
Hi Ratheesh,
You don't really need any code for this, a simple formula will work as I understand your question. Try this: =IF(A1=TODAY(),A1,"") Enter this into cell B1 and copy it down the rows that you need it. It will display the date in the same row of Column B as the date in Column A that matches the current date, and an empty looking cell when the date in A does not match the current date. HTH Bill "Ratheesh" wrote: Hi All - Could you please help me on this? In a worksheet "A" column containing birthdays(date, dd/mm/yyyy). How can I write a code to show date & month("A" column) matching with todays date & month in the respective "B" column.? Thanks a lot in advance for your helps... Ratheesh . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pick date and month?
On Feb 23, 5:48*pm, fisch4bill
wrote: Hi Ratheesh, You don't really need any code for this, a simple formula will work as I understand your question. Try this: *=IF(A1=TODAY(),A1,"") Enter this into cell B1 and copy it down the rows that you need it. It will display the date in the same row of Column B as the date in Column A that matches the current date, and an empty looking cell when the date in A does not match the current date. HTH Bill "Ratheesh" wrote: Hi All - Could you please help me on this? In a worksheet "A" column containing birthdays(date, dd/mm/yyyy). How can I write a code to show date & month("A" column) matching with todays date & month in the respective "B" column.? Thanks a lot in advance for your helps... Ratheesh .- Hide quoted text - - Show quoted text - No it will not work... it will work only the date is today (i.e, today() = today's date, suppose, today is 24/02/2010, this will show there, but I need only date and month, ie, if 24/02/1980 or 24/02/1981 this all should come in B column... as per your code 24.02/2010 only will come in B column. could you please try once again... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pick date and month?
Enter this formula in column(B), format it custom(dd,mm) since you
want 2/22/2010 to show as 22,02 then autofill your range. =IF(MONTH(A2)=MONTH(TODAY()),A2,"") alternately if you wanted VBA code Sub test() For Row = 2 To Range("A65536").End(xlUp).Row If Month(Cells(Row, 1).Value) = Month(Now) Then Cells(Row, 2).Value = Cells(Row, 1).Value Next Columns(2).NumberFormat = "dd,mm" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I pick up a two digit Month? | Excel Programming | |||
pick up date, month and year from a date | Excel Discussion (Misc queries) | |||
Date arithmetic: adding 1 month to prior end of month date | Excel Worksheet Functions | |||
Sort month/date/year data using month and date only | Excel Discussion (Misc queries) | |||
=VLOOKUP(1,Nationality!B5:B29,IF(MONTH(date)6,MONTH(date)-6, MON | Excel Worksheet Functions |