Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
pol pol is offline
external usenet poster
 
Posts: 129
Default How I can create a function with return argument

I have a macro program numoffday

Sub offdays()
li_sunday = .Cells(i, 41).Value
int offDays = numoffday(li_sunday)
End Sub

Please let me know how I can create a function numoffday() with integer
return value in Excel macros
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default How I can create a function with return argument

Please tell us in words what you need the function to do
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"pol" wrote in message
...
I have a macro program numoffday

Sub offdays()
li_sunday = .Cells(i, 41).Value
int offDays = numoffday(li_sunday)
End Sub

Please let me know how I can create a function numoffday() with integer
return value in Excel macros



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default How I can create a function with return argument

Generally a function has the following form...

public function numoffday() as long
numoffday = 12345
end function

I used a long instead of an integer as it is actually more efficient to use
a long on a 32 bit machine...
--
HTH...

Jim Thomlinson


"pol" wrote:

I have a macro program numoffday

Sub offdays()
li_sunday = .Cells(i, 41).Value
int offDays = numoffday(li_sunday)
End Sub

Please let me know how I can create a function numoffday() with integer
return value in Excel macros

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
How can I get around 30 argument limit of SUM function? Randy Excel Worksheet Functions 4 May 9th 07 09:05 PM
VBA function for "Mean" using Array as argument ASokolik Excel Worksheet Functions 21 March 28th 06 10:05 PM
Need Function Argument pasekm Excel Worksheet Functions 4 March 18th 06 11:14 PM
text as an argument of SUM function katarina07 Excel Worksheet Functions 2 October 27th 05 01:59 PM
Create a function to return text if two logical functions are true janeyt Excel Worksheet Functions 2 March 19th 05 08:49 PM


All times are GMT +1. The time now is 11:29 AM.

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"