Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Difference between range.formula and range.formulalocal

Hi,
If I'm writing a macro to check for the formula in a cell,
which proporty should I be using to be internationally
portable.
Say if I write the macro in English, I should be using
the formula proporty and not the FormulaLocal property
right?

Thanks
Andy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Difference between range.formula and range.formulalocal

You have to write the macro in English in xl97 and later.

Use formula if you are going to pass it a string that would work in an
English Version of Excel. Use formulalocal if you will pass it a string
that will work in your regional version. This includes use of list
separators (comma versus period as an example).

--
Regards,
Tom Ogilvy

"Andy" wrote in message
om...
Hi,
If I'm writing a macro to check for the formula in a cell,
which proporty should I be using to be internationally
portable.
Say if I write the macro in English, I should be using
the formula proporty and not the FormulaLocal property
right?

Thanks
Andy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Difference between range.formula and range.formulalocal

I have a feeling that you might have misundertood what
I meant. What I want to accomplish is to override the
Application_BeforeDoubleClick(..) function to find out
what formula (if any) the double-clicked cell contains.
So

'
' the prototype for status routine is
' Function status(i as integer, j as integer) as integer
'
if InStr(activeCell.Formula, "=status(") = 1 Then
MsgBox("It's a Cell containing a call to the function status(i,j)");
Else
MsgBox("It's Not")
End If

In this example, I should be using the .Formula proporty and
not the .FormulaLocal proporty correct? Because .FormulaLocal
proporty would return something different depending on which
region Excel is. Correct? eg, in Europe .FormulaLocal would
return something like "=status(1;2)" and in the US, it would
return something like "=status(1,2)". So is it correct to say
that .Formula is more portable?

Andy

"Tom Ogilvy" wrote in message ...
You have to write the macro in English in xl97 and later.

Use formula if you are going to pass it a string that would work in an
English Version of Excel. Use formulalocal if you will pass it a string
that will work in your regional version. This includes use of list
separators (comma versus period as an example).

--
Regards,
Tom Ogilvy

"Andy" wrote in message
om...
Hi,
If I'm writing a macro to check for the formula in a cell,
which proporty should I be using to be internationally
portable.
Say if I write the macro in English, I should be using
the formula proporty and not the FormulaLocal property
right?

Thanks
Andy

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Difference between range.formula and range.formulalocal

Consult the help. It is pretty self explanatory.

--
Regards,
Tom Ogilvy


"Andy" wrote in message
m...
I have a feeling that you might have misundertood what
I meant. What I want to accomplish is to override the
Application_BeforeDoubleClick(..) function to find out
what formula (if any) the double-clicked cell contains.
So

'
' the prototype for status routine is
' Function status(i as integer, j as integer) as integer
'
if InStr(activeCell.Formula, "=status(") = 1 Then
MsgBox("It's a Cell containing a call to the function

status(i,j)");
Else
MsgBox("It's Not")
End If

In this example, I should be using the .Formula proporty and
not the .FormulaLocal proporty correct? Because .FormulaLocal
proporty would return something different depending on which
region Excel is. Correct? eg, in Europe .FormulaLocal would
return something like "=status(1;2)" and in the US, it would
return something like "=status(1,2)". So is it correct to say
that .Formula is more portable?

Andy

"Tom Ogilvy" wrote in message

...
You have to write the macro in English in xl97 and later.

Use formula if you are going to pass it a string that would work in an
English Version of Excel. Use formulalocal if you will pass it a string
that will work in your regional version. This includes use of list
separators (comma versus period as an example).

--
Regards,
Tom Ogilvy

"Andy" wrote in message
om...
Hi,
If I'm writing a macro to check for the formula in a cell,
which proporty should I be using to be internationally
portable.
Say if I write the macro in English, I should be using
the formula proporty and not the FormulaLocal property
right?

Thanks
Andy



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
How do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
sum the difference in a range carla Excel Worksheet Functions 2 November 21st 07 05:57 PM
Date Range & Difference pm_arrow Excel Worksheet Functions 2 October 29th 07 02:51 PM
Count difference based on Range Richhall Excel Worksheet Functions 2 September 5th 07 12:06 PM
Labelling a row so it can be used as an offset for sum, difference or range Martin Underwood Excel Discussion (Misc queries) 5 March 18th 05 04:37 PM


All times are GMT +1. The time now is 11:14 PM.

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"