View Full Version : Solved: A Quick Queston, rows and column index on an activecell
photon_ed
04-28-2006, 03:29 AM
Hello,
Can anyone please let me know when is the vba syntax for returning the rows and columns index of an activiecell. Example, if activeCell is on cell B3, I would like a vba syntax to return the value of 2 for columes and 3 for rows.
Also it will be greawt if anyone can recommend a website which has a good collection of as a reference of vba codes.
Thank you
yours,
Ed
Bob Phillips
04-28-2006, 03:35 AM
Activecell.Row
Activecell.Column
as simple as that.
Sites, many
www.cpearson.com
www.contextures.com
www.rondebruin.nl
www.j-walk.com/ss
www.mvps.org/dmcritchie/excel/excel.htm
to name but a few.
photon_ed
04-28-2006, 03:39 AM
Thank you Very much for the prompt responds :)
yours,
Ed
photon_ed
04-28-2006, 08:54 AM
I had a go with the codes, Its showing me the values in the cell and not the rows and columes index, please advise.
thanks
yorus,
Ed
Sub getRowAndColumesValues()
ActiveSheet.Range("D7").Activate
ActiveSheet.Range("D7").Select
ActiveSheet.Cells(7, 8) = ActiveCell.Rows
ActiveSheet.Cells(7, 9) = ActiveCell.Columns
End Sub
Bob Phillips
04-28-2006, 11:03 AM
I said Row not Rows
Sub getRowAndColumesValues()
ActiveSheet.Range("D7").Activate
ActiveSheet.Range("D7").Select
ActiveSheet.Cells(7, 8) = ActiveCell.Row
ActiveSheet.Cells(7, 9) = ActiveCell.Column
End Sub
photon_ed
04-28-2006, 01:21 PM
THanks you very much, i will give it a go :)
your help it much appreciated :)
yours,
Ed
photon_ed
05-03-2006, 04:40 AM
Its works, thank you very much for your help :)
yours,
Ed
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.