Language in CELL function

PaulS

Board Regular
Joined
Feb 26, 2006
Messages
66
Dear Excel experts,
I have the following problem. My worksheet was developed in a English version of Excel. One cell had the following contents: =IF(E8=CELL("contents";$K$5);-(G8+H8+I8+J8);""). After sending the worksheet to some users, I found most users have the Dutch version of Excel installed. All functionnames are automatically changed into language version installed, except the constant "contents" of course. (In Dutch the word "inhoud" must be used instead).
To prevent having to develop separate language versions of the workbook I have to test the language of the installed language version.
Q1: How do I test the language version installed?
Q2: Can the value "contents" be placed in a cell e.g. N37 , which then is used in the formula like: =IF(E8=CELL(N37;$K$5);-(G8+H8+I8+J8);"")

Thanks for your help,
Paul
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Copy and paste the code into a VBA module

Code:
Public Function USERLANGUAGE()
USERLANGUAGE = Application.International(xlCountryCode)
End Function

Then test language with the formula

=IF(E8=CELL(IF(userlanguage()=31,"inhoud","contents"),$K$5),-(G8+H8+I8+J8),"")

31 is the language code for Dutch (same as the international dialing code).

Although I'm wondering why you need to use CELL("contents",$K$5) when

=IF(E8=$K$5,-(G8+H8+I8+J8),"")

should suffice, am I missing something?
 
Last edited:
Upvote 0
Thanks for your prompt reply.
I will use your suggestion for the macro.
You are right with your suggestion about the use of the CELL function. The reason is that I needed this function in another part of that sheet. I copied some cells with the result that in other places the function is not required.....
Thanks,
Paul
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,597
Members
449,038
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top