Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
is it posible to have a formula in excel that indicates the current cell? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One could write a UDF, but it wouldn't be accurate most of the time,
since changing the active cell doesn't cause a recalculation. A better way to indicate the active cell would be to use an event macro. Put this in your worksheet code module: Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Range("A1").Value = ActiveCell.Address(False, False) End Sub Change the range to suit. In article .com, thread wrote: Hi all, is it posible to have a formula in excel that indicates the current cell? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi thank you for thr quick answer but my issue is that i want to have
a formula that is not a vba code is it posible i want the formula inside of the cell to indicate what row is it JE McGimpsey : One could write a UDF, but it wouldn't be accurate most of the time, since changing the active cell doesn't cause a recalculation. A better way to indicate the active cell would be to use an event macro. Put this in your worksheet code module: Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Range("A1").Value = ActiveCell.Address(False, False) End Sub Change the range to suit. In article .com, thread wrote: Hi all, is it posible to have a formula in excel that indicates the current cell? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=CELL("address")
Press F9 to update. On 6 Jun, 08:49, thread wrote: Hi thank you for thr quick answer but my issue is that i want to have a formula that is not a vba code is it posible i want the formula inside of the cell to indicate what row is it JE McGimpsey : One could write a UDF, but it wouldn't be accurate most of the time, since changing the active cell doesn't cause a recalculation. A better way to indicate the active cell would be to use an event macro. Put this in your worksheet code module: Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Range("A1").Value = ActiveCell.Address(False, False) End Sub Change the range to suit. In article .com, thread wrote: Hi all, is it posible to have a formula in excel that indicates the current cell?- Hide quoted text - - Show quoted text - |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
If you just want the Row number, as opposed to the cell address as you posted first, then =ROW() -- Regards Roger Govier "thread" wrote in message ups.com... Hi thank you for thr quick answer but my issue is that i want to have a formula that is not a vba code is it posible i want the formula inside of the cell to indicate what row is it JE McGimpsey : One could write a UDF, but it wouldn't be accurate most of the time, since changing the active cell doesn't cause a recalculation. A better way to indicate the active cell would be to use an event macro. Put this in your worksheet code module: Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Range("A1").Value = ActiveCell.Address(False, False) End Sub Change the range to suit. In article .com, thread wrote: Hi all, is it posible to have a formula in excel that indicates the current cell? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you can't use vba code, then a different newsgroup than .programming
would probably have been appropriate. To get just the row of the active cell, you can use =ROW(INDIRECT(CELL("address"))) but you'll have to recalculate (F9) in order to have the formula update. I normally wouldn't use CELL("address") because it will update to the current active cell address, even if the active cell is on another worksheet, but perhaps that's what you want. In article . com, thread wrote: Hi thank you for thr quick answer but my issue is that i want to have a formula that is not a vba code is it posible i want the formula inside of the cell to indicate what row is it JE McGimpsey : One could write a UDF, but it wouldn't be accurate most of the time, since changing the active cell doesn't cause a recalculation. A better way to indicate the active cell would be to use an event macro. Put this in your worksheet code module: Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Range("A1").Value = ActiveCell.Address(False, False) End Sub Change the range to suit. In article .com, thread wrote: Hi all, is it posible to have a formula in excel that indicates the current cell? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
or just:
=CELL("row") On 6 Jun, 13:23, JE McGimpsey wrote: If you can't use vba code, then a different newsgroup than .programming would probably have been appropriate. To get just the row of the active cell, you can use =ROW(INDIRECT(CELL("address"))) but you'll have to recalculate (F9) in order to have the formula update. I normally wouldn't use CELL("address") because it will update to the current active cell address, even if the active cell is on another worksheet, but perhaps that's what you want. In article . com, thread wrote: Hi thank you for thr quick answer but my issue is that i want to have a formula that is not a vba code is it posible i want the formula inside of the cell to indicate what row is it JE McGimpsey : One could write a UDF, but it wouldn't be accurate most of the time, since changing the active cell doesn't cause a recalculation. A better way to indicate the active cell would be to use an event macro. Put this in your worksheet code module: Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Range("A1").Value = ActiveCell.Address(False, False) End Sub Change the range to suit. In article .com, thread wrote: Hi all, is it posible to have a formula in excel that indicates the current cell?- Hide quoted text - - Show quoted text - |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yup. Again, same behavior (need F9, updates on other sheets). May work
for OP... In article .com, Lori wrote: or just: =CELL("row") |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this is the disadvantage that doesnt work for me here,becaouse i want
to use replace function of the windows and place a formula based on the current cell and the problem is that if i move to another cell,it will autoticly update all the cells with the current one any bypass to this problem? JE McGimpsey : Yup. Again, same behavior (need F9, updates on other sheets). May work for OP... In article .com, Lori wrote: or just: =CELL("row") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to use the active cell in an Excel formula | Excel Worksheet Functions | |||
To run the formula from any active cell | Excel Discussion (Misc queries) | |||
referring to formula in a non active cell from active cell | Excel Discussion (Misc queries) | |||
Active Cell To Change Formula | Excel Discussion (Misc queries) | |||
Excel VBA-use variable in active cell formula problem | Excel Programming |