• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Get the address(column) of active cell

annupojupradeep

New Member
Good Morning Team,


how to get the address(column) of active cell where active cell is not fixed, example : cell (A4)then we need the row = 4 & col =A .

cell (G4 then we need the row = 4 & col = G .


Regards,

Pradeep
 
Hi, annupojupradeep!


"Activecell.Column" retrieves the column number of the active cell, wherever it is in the whole worksheet.

For manually setting the active cell to row 4, column A you can do:

"Range("A4").Select" (unquoted for the external)... or

"Cells(4,1).Select" ... or

For G4 proceed accordingly.


Regards!
 
Thanks Sir for your quick response...

But I need to know that... example:- I want to find a name "Pradeep" in a particular worksheet wchich is exist in cell D18. Here I want the result of that entire column no. with alpha numeric e.g; as in the preivious mail you replied dat "Activecell.column" this will give only column number, but i want both alphanumeric D18.


EX.If a enter the forumla "Activecell.column" this will give results as "18",

but i want as "D18".


Thanks & Regards,

Pradeep.
 
This can be done more easily with the address formula.


=ADDRESS(MATCH("Pradeep",B:B,0),COLUMN(B1),4), change the row & column as per u r requirements.

In this example this formula will search for Pradeep in B row & return the value like B25
 
We are really sorry for more confusion ,but hope the below detailed explanation would help you to understand the requirement of us.


We have TEXT to be find in Entire row # 16 If the Text value which is "410" is found then we select that cell , from that active cell need that Column Letter.


Example : we found Text in cell "F16 " i need the value of only F
 
in VBA use

Code:
Mid(ActiveCell.Address, 2, InStr(2, ActiveCell.Address, "$") - InStr(1, ActiveCell.Address, "$") - 1)
 
Back
Top