Rookie question: placing a value into one cell based on a forrmula in another

  • Thread starter Thread starter Kelley
  • Start date Start date
K

Kelley

How do I use Excel VBA to place the calculated value of one cell into
another cell as a fixed value. i.e.: A1 contains the formula
=today()-6 which today resolves as "10/27/03" or it's serial
equivalent. I would like a macro to put "10/27/03" into B1 as a value.

I know this is easy, but I can't find an answer anywhere. For future
reference, is there an free online resource for people just learning
VBA?

Thanks,

Kelley New
 
Kelley,

I'm not sure exactly what you're after, but perhaps you are looking for
something like

Range("B1").Value = Range("A1").Value

This will put the value of A1 in to B1.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
Range("B1").Value = ''" Range("A1").Text

if you want it in as a string

Range("B1").Value = Range("A1").Value
Range("B1").Numberformat = Range("A1").Numberformat

There is no charge for posting here.

Dave McRitchie has a links to some tutorials. The VBA tutorials are after
the Excel tutorials:
http://www.mvps.org/dmcritchie/excel/excel.htm#tutorials
 

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