Excel Function
I'm trying to write a User Defined Function and need the VB syntax to refer
to the cell. For example if my function is called func1 and I put the formula =func1(B2) in my spreadsheet, I want to manipulate the contents of B2 in my function. I need something like: Function func1(Entry As Long) Addr = Application.Caller.Address func1 = Addr.Contents End Function I need some syntax help here and some basic VB instruction - I know enough programming to be dangerous - I just need a little start. Is there a web site I can refer to? Thanks for any help. |
Excel Function
Start with
http://www.xlpert.com/toc.htm http://www.angelfire.com/biz7/julian...ans_macros.htm http://www.contextures.com/tiptech.html "dhstein" wrote: I'm trying to write a User Defined Function and need the VB syntax to refer to the cell. For example if my function is called func1 and I put the formula =func1(B2) in my spreadsheet, I want to manipulate the contents of B2 in my function. I need something like: Function func1(Entry As Long) Addr = Application.Caller.Address func1 = Addr.Contents End Function I need some syntax help here and some basic VB instruction - I know enough programming to be dangerous - I just need a little start. Is there a web site I can refer to? Thanks for any help. |
Excel Function
Try This. Let me know your thoughts.
Function Cells_Control() j = 4 i = 1 Sheets(2).Select For i = 1 To 50 Cells(i, j).Value = "Movie " & i Cells(i, j).Font.ColorIndex = i + 4 - j Next i End Function This function will pring the title " Movie " Plus the movie number and it will change the color for each line Argy "Sheeloo" wrote: Start with http://www.xlpert.com/toc.htm http://www.angelfire.com/biz7/julian...ans_macros.htm http://www.contextures.com/tiptech.html "dhstein" wrote: I'm trying to write a User Defined Function and need the VB syntax to refer to the cell. For example if my function is called func1 and I put the formula =func1(B2) in my spreadsheet, I want to manipulate the contents of B2 in my function. I need something like: Function func1(Entry As Long) Addr = Application.Caller.Address func1 = Addr.Contents End Function I need some syntax help here and some basic VB instruction - I know enough programming to be dangerous - I just need a little start. Is there a web site I can refer to? Thanks for any help. |
All times are GMT +1. The time now is 02:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com