ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Converting a formula to a date (https://www.excelbanter.com/excel-worksheet-functions/126939-converting-formula-date.html)

tom

Converting a formula to a date
 
I am attempting to create a macro that will convert a date formula to a
standard date which will not show the formula. Following is the formula.

1/1/2007 is the first cell
A1+7 gives us 1/8/2007.

I need now to make the cell with A1+7 to yield just the date without the
formula without the formula.

Can anyone help.
--
Tom

JMB

Converting a formula to a date
 
if that formula is in A2, try:

Range("A2").value = Range("A2").value



"tom" wrote:

I am attempting to create a macro that will convert a date formula to a
standard date which will not show the formula. Following is the formula.

1/1/2007 is the first cell
A1+7 gives us 1/8/2007.

I need now to make the cell with A1+7 to yield just the date without the
formula without the formula.

Can anyone help.
--
Tom


FSt1

Converting a formula to a date
 
hi,
Try playing around with something like this. It may not be want you want but
maybe it will give you ideas.

Sub MacPasteValues()

Range("A1").FormulaR1C1 = "1/1/2007"
Range("B1").Value = Range("A1") + 7
Range("B1").Copy
Range("B1").PasteSpecial xlPasteValues

End Sub

regards
FSt1


"tom" wrote:

I am attempting to create a macro that will convert a date formula to a
standard date which will not show the formula. Following is the formula.

1/1/2007 is the first cell
A1+7 gives us 1/8/2007.

I need now to make the cell with A1+7 to yield just the date without the
formula without the formula.

Can anyone help.
--
Tom



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com