Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Rookie question: placing a value into one cell based on a forrmula in another

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Rookie question: placing a value into one cell based on a forrmula in another

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


"Kelley" wrote in message
om...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Rookie question: placing a value into one cell based on a forrmula in another

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....htm#tutorials

--
Regards,
Tom Ogilvy

Kelley wrote in message
om...
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



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
placing people into age groups based on their DOB JSAUS Excel Worksheet Functions 3 March 17th 10 02:42 PM
Placing Col & Row identifiers into a cell as text John Excel Worksheet Functions 3 May 28th 08 01:46 AM
rookie question Nevermind Charts and Charting in Excel 2 June 12th 07 05:57 PM
Forrmula Formatting question... Tibbets Excel Discussion (Misc queries) 2 April 21st 06 11:16 PM
VBA rookie question - listbox and GOTO Harald Staff[_4_] Excel Programming 3 September 7th 03 04:55 PM


All times are GMT +1. The time now is 09:00 AM.

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

About Us

"It's about Microsoft Excel"