View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
oercim oercim is offline
external usenet poster
 
Posts: 51
Default user defined function which increase consecutively while passingbelow cells

I need help about a subject. I won't state my real problem here since it will take long time to you. But if I understand the below problem's solution, I guess I can solve my real problem.


I want to define my own function in excel. Let name of that function be "myfunc". Now, let use this function in a cell in a sheet. I want it return "1" in the initial cell. When I pass this function to below cell, then I want it return "2". As I pass it below I want return value increase 1 by 1. How can be defined such function in vba.


I will be very glad if you help me. Thanks a lot.