How to get the Name Box name of an Excel cell

0 votes

I have a cell in Excel for which I have assigned a variable name, this_cells_name, to a cell, D2, by using the Excel Name Box.

Here is an example of what the Excel Name Box is:

The Excel Name Box

I want to be able to point to that cell and get the variable name as a return value.

I know how to do the following:

  • use =CELL("address",D2) and get "$D$2" as a return value,
  • use =CELL("address",this_cells_name) and get "$D$2" as a return value.

I want to do the following:

  • use =some_function(D2) and get "this_cells_name" as a return value.

How can I do this? A VBA solution would be fine.

Mar 11, 2022 in Database by Edureka
• 13,670 points
3,940 views

1 answer to this question.

0 votes

By typing in the Name Box, you may easily give the chosen cells a name. There are a few guidelines for Excel names.

Choose the cell(s) that will be renamed.

To the left of the formula bar, click the Name box.

Fill in a one-word name for the list, such as FruitList.

Enter the code.

Excel names in name box

When you're generating a name in Excel, follow these Microsoft guidelines.

A name's initial character must be a letter underscore (_) backslash (\).
Letters and numerals might make up the rest of the name.
Characters are highlighted by periods.
It is not permitted to do the following:
As part of a name, no space characters are permitted.
A$35 or R2D2 are examples of names that do not appear like cell phone numbers.
Excel employs the letters C, c, R, and r as selection shortcuts; they can't be used as names.
There is no distinction between upper and lower case for names. North and NORTH, for example, are used interchangeably.

answered Mar 15, 2022 by gaurav
• 23,260 points

Related Questions In Database

0 votes
0 answers

How to get address, Column Name and Row Name of all marked rows in Excel table as rows in new worksheet

 need the row/column combinations marked with an ...READ MORE

Feb 24, 2022 in Database by Edureka
• 13,670 points
1,716 views
0 votes
1 answer

How to view the XML form of an Excel file?

Excel is a spreadsheet programme. Click File->Open in ...READ MORE

answered Mar 25, 2022 in Database by Edureka
• 13,670 points
5,106 views
0 votes
1 answer

What is the SQL query to get the third highest salary of an employee from employee_table

You can try out something like this: SELECT ...READ MORE

answered Sep 27, 2018 in Database by Sahiti
• 6,370 points
11,558 views
0 votes
1 answer

How to add a named sheet at the end of all Excel sheets?

Kindly use this one liner: Sheets.Add(After:=Sheets(Sheets.Count)).Name = "new_sheet_name" Or ...READ MORE

answered Apr 5, 2022 in Database by gaurav
• 23,260 points
413 views
0 votes
0 answers
0 votes
2 answers

What are the ways to get the count of records in a table

With the help of the SQL count ...READ MORE

answered Aug 20, 2020 in Database by Okugbe
• 280 points
3,591 views
0 votes
1 answer

How will I get all the rows from my table where name starts with 's' and ending with 'I'?

Hi Santanu, I understand your problem, You can try ...READ MORE

answered May 28, 2019 in Database by sampriti
• 1,120 points
1,705 views
0 votes
1 answer

How to generate the statement CREATE TABLE for an existing table in postgreSQL?

Generate table creation statement for an existing ...READ MORE

answered Feb 9, 2022 in Database by Neha
• 9,060 points
5,911 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP