Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Function arguments without quotation marks

Hi group, again. One tricky question (I think). Is it at all
possible to pass arguments to a function without using quotation
marks? One example:

Function t(nome)
t = nome
End Function

On cell A1:

=t(abc)

Doing this I get on the cell the "#NAME?" error, and doing:

t = CStr(nome)

I get on the cell "Error 2029". However, doing:

=t(123)

No error happens. I don't know exactly why numbers can be passed
without quotation marks (but I think that it's because all non-numbers
are characters and characters are strings, maybe?)

Nevertheless, I would like to be able to use custom functions without
doing =t("abc"), but instead =t(abc)

Is it at all possible?

Sincere regards,
Marco

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Function arguments without quotation marks

I don't think it is possible as when you do abc without quotes it could be a
range name or maybe something else. What you can do though is put abc in a
different cell and refer to that cell.

RBS

"marco" wrote in message
ups.com...
Hi group, again. One tricky question (I think). Is it at all
possible to pass arguments to a function without using quotation
marks? One example:

Function t(nome)
t = nome
End Function

On cell A1:

=t(abc)

Doing this I get on the cell the "#NAME?" error, and doing:

t = CStr(nome)

I get on the cell "Error 2029". However, doing:

=t(123)

No error happens. I don't know exactly why numbers can be passed
without quotation marks (but I think that it's because all non-numbers
are characters and characters are strings, maybe?)

Nevertheless, I would like to be able to use custom functions without
doing =t("abc"), but instead =t(abc)

Is it at all possible?

Sincere regards,
Marco


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Function arguments without quotation marks

On Feb 28, 11:12 pm, "RB Smissaert"
wrote:
I don't think it is possible as when you do abc without quotes it could be a
range name or maybe something else. What you can do though is put abc in a
different cell and refer to that cell.

RBS

"marco" wrote in message

ups.com...



Hi group, again. One tricky question (I think). Is it at all
possible to pass arguments to a function without using quotation
marks? One example:


Function t(nome)
t = nome
End Function


On cell A1:


=t(abc)


Doing this I get on the cell the "#NAME?" error, and doing:


t = CStr(nome)


I get on the cell "Error 2029". However, doing:


=t(123)


No error happens. I don't know exactly why numbers can be passed
without quotation marks (but I think that it's because all non-numbers
are characters and characters are strings, maybe?)


Nevertheless, I would like to be able to use custom functions without
doing =t("abc"), but instead =t(abc)


Is it at all possible?


Sincere regards,
Marco- Hide quoted text -


- Show quoted text -


That's what I thought. Thanks a lot RBS.

Marco

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
Finding Quotation marks in Search function ahearn Excel Worksheet Functions 6 May 11th 06 12:00 AM
Using Quotation Marks in Arguments Tom Ogilvy Excel Programming 1 April 8th 06 08:51 PM
Using Quotation Marks in Arguments davesexcel[_92_] Excel Programming 0 April 8th 06 08:46 PM
Using Quotation Marks in Arguments Dawg House Inc Excel Programming 0 April 8th 06 08:34 PM
Passing string arguments that have quotation marks in them Caro-Kann Defence[_2_] Excel Programming 2 April 21st 05 03:26 PM


All times are GMT +1. The time now is 10:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"