Excel: how to get current cell's address
Автор темы: Samuel Murray
Samuel Murray
Samuel Murray  Identity Verified
Нидерланды
Local time: 14:27
Член ProZ.com c 2006
английский => африкаанс
+ ...
Oct 18, 2021

Hello everyone

Is there a function or functionality in Excel (latest version) that will get me the current cell's address? I mean, if I click a cell (say, A22), and press a shortcut or use a menu, I want "A22" to be added to the clipboard. Does anyone know how to accomplish this?

Thanks
Samuel


 
Samuel Murray
Samuel Murray  Identity Verified
Нидерланды
Local time: 14:27
Член ProZ.com c 2006
английский => африкаанс
+ ...
Автор темы
One solution Oct 18, 2021

The first solution that I found (which is a manual process, but you can do it using just the keyboard), is this:
1. Right-click the cell, and press "a" (Define name).
2. Press Alt+R (this selects the text in "Refers to").
3. Press Ctrl+C to copy, and convert the content to a cell address. E.g. if the worksheet is named "Hello", then you'd get "=Hello!$A$22", which is A22.


 
Joakim Braun
Joakim Braun  Identity Verified
Швеция
Local time: 14:27
немецкий => шведский
+ ...
VB script Oct 18, 2021

https://stackoverflow.com/questions/2202093/get-the-current-cell-in-excel-vb/42361786
https://www.wallstreetmojo.com/vba-active-cell/
... See more
https://stackoverflow.com/questions/2202093/get-the-current-cell-in-excel-vb/42361786
https://www.wallstreetmojo.com/vba-active-cell/
https://www.excelcampus.com/vba/keyboard-shortcut-run-macro/

Write a macro (VB script) and set a shortcut for it.
It's three lines of code or so.
Collapse


 
Endre Both
Endre Both  Identity Verified
Германия
Local time: 14:27
английский => немецкий
Autohotkey Oct 19, 2021

Hi Samuel, you have been using AutoHotkey in the past, right? Here's a snippet that copies the current cell reference to the clipboard when you press Alt+F1:

!F1::
    xl := ComObjActive("Excel.Application")
    currentCellRef := xl.ActiveCell.Address ; e.g. $A$1
    currentCellRef := RegExReplace(currentCellRef, "\$", "") ; $A$1 -> A1
    Clipboard := currentCellRef
return


 
Samuel Murray
Samuel Murray  Identity Verified
Нидерланды
Local time: 14:27
Член ProZ.com c 2006
английский => африкаанс
+ ...
Автор темы
Thanks, everyone Oct 19, 2021

Thanks for your ideas. I may try them out in a future job. I had to complete the current job in record time. It involved pasting the translation of e.g. cell AAA21 into e.g. cell AAF21 etc. I copied all cells to Word, converted them to a plain text list, and then translated them, and then copy/pasted the translations into the appropriate cells in Excel. Being able to tell my script what a cell's address is helped me for instances where the "translation" cells were not in predictable locatio... See more
Thanks for your ideas. I may try them out in a future job. I had to complete the current job in record time. It involved pasting the translation of e.g. cell AAA21 into e.g. cell AAF21 etc. I copied all cells to Word, converted them to a plain text list, and then translated them, and then copy/pasted the translations into the appropriate cells in Excel. Being able to tell my script what a cell's address is helped me for instances where the "translation" cells were not in predictable locations.Collapse


 


To report site rules violations or get help, contact a site moderator:

Модератор(ы) этого форума
Maya Gorgoshidze[Call to this topic]
Prachya Mruetusatorn[Call to this topic]

You can also contact site staff by submitting a support request »

Excel: how to get current cell's address






Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »
Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »