![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
How can I change a working macro (sub) into one I can place in a cell? Such as SUM()???
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
You declare it as a Public Function. Instead of having it in a Sub, you would have it in a Public Function.
for example, put this in a standard module:
To use this function simply type in "=MySum(XX:XX)", where "XX:XX" is the range that you'd like to get the sum of. HTH |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Man, is my face red! THANKS...
(is there a way to set when these functions are activated? I am monitoring the length of a table for a %, can I set it so it will run when the table length cahnges-- or is that not needed?) Again Thanks for the help... |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|