-
Jan 21st, 2018, 06:32 AM
#1
Thread Starter
New Member
Excel Conditional Formatting in VS2013
Hello,
I'm fighting with the following simple line of code:
Code:
oFormatCondition1 = CType(xlRange.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlCellValue, Operator:=Excel.XlFormatConditionOperator.xlNotEqual, Formula1:="=RC[-1]"), Excel.FormatCondition)
if I just replace "=RC[-1]" by a numeric value, it's working, but not with this formula!
the condition I want to write is: if this cell value <> the previous cell value (RC[-1])
Can someone help me here ?
Thanks in advance
-
Jan 25th, 2018, 04:45 AM
#2
Thread Starter
New Member
Re: Excel Conditional Formatting in VS2013
Hey, hey,
nobody to help me ?
thanks in advance
-
Jan 25th, 2018, 08:55 AM
#3
Re: Excel Conditional Formatting in VS2013
Hi,
perhaps this will help...
Code:
......
'Calulate values,
'in German = "=Summe(D2:D5)"
'in Englisch probably = "=Sum(D2:D5)"
oSheet.Range("D7").Value = "=Summe(D2:D5)"
oSheet.Range("D7").NumberFormatLocal = "#.##0,00"
.......
regards
Chris
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
-
Jan 25th, 2018, 09:47 AM
#4
Thread Starter
New Member
Re: Excel Conditional Formatting in VS2013
Thanks a lot for your answer ChrisE.
I found how to fix this issue, and it doesn't sound logical to me ! but it's working !
I write formulas in my Excel file with RC type formula (eg. "=RC[-1]")
And for conditional formatting, I need to write formulas in French (installation langage). So for me, it's LC(-1).
It doesn' really make sense to me to write formulas in both formats ...
Anyway, if someone gets this problems too, you may want to try this solution.
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|