Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default finding current row

I am writing a general function and I would like to know what row the
function was excuted from, so that I can place that value in
Cells(row,col).value I have not been to find a behavior that will do this.
can anyone help

thanks
Bob


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default finding current row

Hi Bob,

If I understand correctly
ActiveCell.Row
should do the job ...
Now if you need to store it, you would need to have a variable
Dim MyRow As Integer
and place following line in the right spot in your code
MyRow = ActiveCell.Row

HTH
Cheers
Carim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default finding current row

Sub test()

MsgBox ActiveCell.Row

End Sub

RBS


"Bob Taylor" wrote in message
...
I am writing a general function and I would like to know what row the
function was excuted from, so that I can place that value in
Cells(row,col).value I have not been to find a behavior that will do this.
can anyone help

thanks
Bob


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default finding current row

Within an User Defined Function:
Application.Caller.row

HTH
--
AP

"Bob Taylor" a écrit dans le message de
...
I am writing a general function and I would like to know what row the
function was excuted from, so that I can place that value in
Cells(row,col).value I have not been to find a behavior that will do

this.
can anyone help

thanks
Bob




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default finding current row

Just note that in a User Defined function used in a worksheet (of which I
believe Ardus speaks), you can not write values to other cells.

--
Regards,
Tom Ogilvy


"Ardus Petus" wrote in message
...
Within an User Defined Function:
Application.Caller.row

HTH
--
AP

"Bob Taylor" a écrit dans le message de
...
I am writing a general function and I would like to know what row the
function was excuted from, so that I can place that value in
Cells(row,col).value I have not been to find a behavior that will do

this.
can anyone help

thanks
Bob






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
Finding the current year BrittaniMV Excel Worksheet Functions 3 May 15th 09 07:34 PM
finding 75 days before current date vikkib Excel Worksheet Functions 3 May 29th 08 08:26 PM
Finding the current worksheet name wild_fish99 Excel Programming 2 December 5th 05 03:02 AM
Finding Current Path Mike C Excel Programming 1 April 7th 05 09:14 PM
Finding the current date serge Excel Programming 2 February 18th 04 10:39 AM


All times are GMT +1. The time now is 11:27 PM.

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"