View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default Add to a "number as text"

"Claus Busch" wrote:
Am Tue, 07 Oct 2014 12:56:30 -0400 schrieb GS:
Length is optional and so if left out the length will be
everything after the start position.

[....]
I tested it. But it is only working with VBA. For the
function MID into the worksheet the third argument
(length) is a must.


Both statements are correct. So what is your point?

Comments should always be interpreted in the context in which they are made.

You are using the VBA Mid function, and GS's comment is about the VBA Mid
function.

VBA and Excel are different languages, so it should not be surprising if
functions with the same name behave differently in both languages.

For example, if we use the VBA Trim function, we might point out that it
removes only leading and trailing spaces.

You might point out that the Excel TRIM function also replaces two or more
spaces in the middle with one space.

Both statements are correct. One applies to the VBA function; the other
applies to the Excel function. So what?

PS: WorksheetFunction functions should behave like the Excel counterparts
they are intended to emulate. There is no WorksheetFunction.Mid function.
But there is WorksheetFunction.Trim function.