#1   Report Post  
Posted to microsoft.public.excel.misc
nc
 
Posts: n/a
Default Help write Macro

Date Month


I have two columns as above Date and Month. I would like to use a macro to
write the function =MthName(MONTH(A129)) in the month column in the same row
when I populate the date field.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier
 
Posts: n/a
Default Help write Macro

Hi

If it is only for display purposes, you don't need a macro
In B2 enter =A1 then format the cell as follows
FormatCellsNumberCustom mmmm

Regards

Roger Govier


nc wrote:
Date Month


I have two columns as above Date and Month. I would like to use a macro to
write the function =MthName(MONTH(A129)) in the month column in the same row
when I populate the date field.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Help write Macro

How about an alternative:

=text(a129,"mmmm")
or
=if(a129="","",text(a129,"mmmm"))





nc wrote:

Date Month

I have two columns as above Date and Month. I would like to use a macro to
write the function =MthName(MONTH(A129)) in the month column in the same row
when I populate the date field.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
nc
 
Posts: n/a
Default Help write Macro

Dave

Thanks for your suggestion, but I only wanted the cell populated if there
was a date in the corresponding cell.



"Dave Peterson" wrote:

How about an alternative:

=text(a129,"mmmm")
or
=if(a129="","",text(a129,"mmmm"))





nc wrote:

Date Month

I have two columns as above Date and Month. I would like to use a macro to
write the function =MthName(MONTH(A129)) in the month column in the same row
when I populate the date field.


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
nc
 
Posts: n/a
Default Help write Macro

Roger

Thanks for your reply.



"Roger Govier" wrote:

Hi

If it is only for display purposes, you don't need a macro
In B2 enter =A1 then format the cell as follows
FormatCellsNumberCustom mmmm

Regards

Roger Govier


nc wrote:
Date Month


I have two columns as above Date and Month. I would like to use a macro to
write the function =MthName(MONTH(A129)) in the month column in the same row
when I populate the date field.




  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Help write Macro

The second suggestion doesn't limit it to just dates, but it might be sufficient
if you only type dates in A129.

nc wrote:

Dave

Thanks for your suggestion, but I only wanted the cell populated if there
was a date in the corresponding cell.

"Dave Peterson" wrote:

How about an alternative:

=text(a129,"mmmm")
or
=if(a129="","",text(a129,"mmmm"))





nc wrote:

Date Month

I have two columns as above Date and Month. I would like to use a macro to
write the function =MthName(MONTH(A129)) in the month column in the same row
when I populate the date field.


--

Dave Peterson


--

Dave Peterson
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
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Can I record or write a macro to send a worksheet via Outlook? Catherine Excel Discussion (Misc queries) 1 September 14th 05 04:15 AM
How to write a macro?? Keeter Excel Discussion (Misc queries) 1 July 19th 05 08:34 PM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM
how to write macro after autofilter is applied emre Excel Worksheet Functions 2 March 31st 05 02:59 PM


All times are GMT +1. The time now is 09:46 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"