tick formula

J

jossfrimond

Thank you for your kind help!

I'm very nearly there - you were right, it's because I have a Frenc
version of Excel, and the error in the column E says "NOM" which mean
"NAME"

Otherwise, it works perfectly. Could you have a look and tell me what
have to do to get it right?

Thanks agai

+-------------------------------------------------------------------
|Filename: tick formula.zip
|Download: http://www.excelforum.com/attachment.php?postid=2735
+-------------------------------------------------------------------
 
D

Dave Peterson

=Len() is the function's name to tell how long a string is.

You can try this short macro:

Option Explicit
Sub testme()

Range("e2").Formula _
= "=IF(COUNTA(B2:D2)<>1,""Please check exactly one cell in B:D""," & _
"IF(LEN(B2)>0,A2*2,IF(LEN(C2)>0,A2*3,A2*4)))"


End Sub

When the macro runs, excel will translate the function names into French.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Short course:

Start a new workbook.
Hit alt-f11 to get to the VBE (where macros/UDF's live)
hit ctrl-R to view the project explorer
Find your workbook.
should look like: VBAProject (book1)

right click on the project name
Insert, then Module
You should see the code window pop up on the right hand side

Paste the code in there.

Then put the cursor anywhere in the module (between the Sub and "end sub" lines
and hit F5.

Now swap back to excel and look at E5.

You'll see the formula you should use in your workbook.

(And you can toss the workbook with the macro.)

KeepItCool has a translator utility at:
http://members.chello.nl/keepitcool/download.html

You may want to try it.
 
Top