ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   FormulaR1C1 - 16/02/1871 (https://www.excelbanter.com/excel-programming/338851-formular1c1-16-02-1871-a.html)

Simon Woods[_4_]

FormulaR1C1 - 16/02/1871
 
Hi

I'm trying to assign the above date to FormulaR1C1 and it's throwing an
error. Later dates are fine. What's the best way to handle this scenario?

Thanks

Simon




Gary's Student

FormulaR1C1 - 16/02/1871
 
This worked:

Sub junkthis()
Worksheets("Sheet1").Range("B1").FormulaR1C1 = "16/02/1871"
End Sub

BUt notice the "date" is in quotes. Remember that Excel can not handle true
dates prior to 1 January 1900.
--
Gary's Student


"Simon Woods" wrote:

Hi

I'm trying to assign the above date to FormulaR1C1 and it's throwing an
error. Later dates are fine. What's the best way to handle this scenario?

Thanks

Simon






All times are GMT +1. The time now is 01:28 PM.

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