Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I pick up a two digit Month? Don Guillett Excel Programming 1 January 12th 07 05:18 PM
pick up date, month and year from a date vikkam Excel Discussion (Misc queries) 4 July 27th 06 04:27 AM
Date arithmetic: adding 1 month to prior end of month date manxman Excel Worksheet Functions 2 July 14th 06 09:29 PM
Sort month/date/year data using month and date only SMW820 Excel Discussion (Misc queries) 6 June 22nd 06 05:14 PM
=VLOOKUP(1,Nationality!B5:B29,IF(MONTH(date)6,MONTH(date)-6, MON Ali Excel Worksheet Functions 14 January 18th 06 08:20 AM


All times are GMT +1. The time now is 06:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"