Update Month

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I need help designing a VBA macro that would the following:

I have in row C5 "From January 2005 to xxxx"
I'd like to replace or update xxxx by the current month, which I have in
cell A2.
Thanks,
 
Jeff,

If A2 is a date:
Range("C5").Value = "From January 2005 to " & Format(Range("A2").Value,
"mmmm yyyy")

If A2 is a string:
Range("C5").Value = "From January 2005 to " & Range("A2").Value

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top