Help write Macro

N

nc

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.
 
R

Roger Govier

Hi

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

Regards

Roger Govier
 
D

Dave Peterson

How about an alternative:

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

nc

Dave

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

nc

Roger

Thanks for your reply.



Roger Govier said:
Hi

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

Regards

Roger Govier
 
D

Dave Peterson

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