Bonsour® Bob Phillips avec ferveur ;o))) vous nous disiez :
This workbook is not too helpful as it has lots of formulae such as
=1*TEXT(TODAY()+ROW(),"aaaammjj") in it, which just don't work in a
non-French version of Excel.
Hello Bob,
;o))) you say :
No I am not American, I am English, so I too suffer Excel's American date
bias.
I have already experienced the inconvenience with colleagues
Spanish ( "aaaammdd") and German ( "jjjjmmtt")
for this example : formulas in range A:A
are used only to perform automatically correct ISO date
all entry in this range may be erased
As I have already said in a previous response :
during the exchanges between foreign users : formats and string did not appear to be translated nor conditional formulas ...
:-(
I produced this example voluntarily without macro.
I'm sorry, but I can not circumvent these inconveniences without using some macros limited to this one event
Obviously it is possible to do :
1- some search & replace on a selected range :
Selection.Replace What:="""aaaammjj""", Replacement:="""yyyymmdd""", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
2 - for named cells
ActiveWorkbook.Names.Add Name:="Expiry7", RefersToR1C1:= _
"=1*TEXT(TODAY()+7,""yyyymmdd"")"
ActiveWorkbook.Names.Add Name:="ExpiryM", RefersToR1C1:= _
"=1*TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())+1,DAY(TODAY())),""yyyymmdd"")"
ActiveWorkbook.Names.Add Name:="Expiry3M", RefersToR1C1:= _
"=1*TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())+3,DAY(TODAY())),""yyyymmdd"")"
3 - for CF :
Range("A2:A100").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=Expiry7", Formula2:="=1*TEXT(today(),""yyyymmdd"")"
Selection.FormatConditions(1).Interior.ColorIndex = 3
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=ExpiryM", Formula2:="=Expiry7"
Selection.FormatConditions(2).Interior.ColorIndex = 45
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=Expiry3M", Formula2:="=ExpiryM"
Selection.FormatConditions(3).Interior.ColorIndex = 6