LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How to use Implicit Intersection in a VBA Function

I use defined names in all my workbooks. Sometimes i need to pass a cell
value to a vba function. To do this to an excel function I would just pass a
one dimensional range like an entire column or row and excel will compute for
the value in the same row or column as the function like Gross Profit = Sales
- Cost of Sales and each of those is defined as an entire row.

Now if I do this to a vba function it will not interpret the range as a
cell. I deed to pass it the exact cell reference. I do this just now by using
the index function. However, I'd like to do it entirely in vba and can't find
a simple way to return just the value (not the reference) in the cell in the
same row as the application caller. I'd have to use the application caller
function to return the address of the cell containing the vba function, then
compute the address of the cell in the adjacent row to get its value and used
that. Surely there is an easier way.

Any help would be much appreciated. An example like the one I used above
would be great, i.e. just add two numbers together using add in a vba
function accepting the sales and costs as range inputs.

JMB
 
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
intersection function tarheelrooster Excel Discussion (Misc queries) 2 October 16th 09 10:30 AM
implicit file reference Tuee Excel Programming 4 February 10th 06 02:55 PM
I NEED A FUNCTION TO FIND IF THERE IS AN INTERSECTION BETWEEN 2 DATE RANGES MissSara Excel Worksheet Functions 10 September 7th 05 09:40 PM
I NEED A FUNCTION TO FIND IF THERE IS AN INTERSECTION BETWEEN 2 DATE RANGES MissSara Excel Programming 10 September 7th 05 09:40 PM
implicit activation jgreif Excel Programming 0 May 26th 05 01:59 AM


All times are GMT +1. The time now is 12:00 AM.

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

About Us

"It's about Microsoft Excel"