Buksy
Buksy

Reputation: 12238

Using vba functions in cell formula

I need to round two values and sum them then. The problem is, I have Czech version of MS Excel, and rounding function is called "Zaokrouhlit"

enter image description here

So my formula looks like =ZAOKROUHLIT(A1, 2) + ZAOKROUHLIT(A2, 2)

Now I'm thinking, what if I send my file to someone that is using excel in different language version, will it work?

So I tried default function =ROUND(A1, 2) + ROUND(A2, 2)

enter image description here

But my version of excel doesn't know anything about such a function.

Fortunatelly, I can use this function inside VBA subroutines, so my question is:
How to use VBA function inside formula?

Upvotes: 2

Views: 848

Answers (1)

Our Man in Bananas
Our Man in Bananas

Reputation: 5977

try these localization solutions:

VanTed Bits: Excel VBA Tip: translate formulas between local language and English

excel-macro-inserting-internationally-valid-formula-during-run-time

there are several answers, and between them they should help you

Upvotes: 2

Related Questions