+ Reply to Thread
Results 1 to 14 of 14

How to name cells automatically using top row and left column entries

  1. #1
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Cool How to name cells automatically using top row and left column entries

    Hello. Say I have Jan, Feb, Mar going across the top row of my table, and Revenue and COGS going down the left column of my table. Is there a way to automatically name the corresponding interior cells Jan.Revenue, Feb.Revenue, etc. without using VBA? Highlighting the entire table and using the Insert - Name - Create (and then selecting the "Top Row" and "Left Column" boxes), I am able to name the ranges, but I would like to be able to name the individual cells. Not looking for the VBA code at this time . . . just if it can be done without using VBA. This seems like a task that Excel can easily do, but can't seem to find the feature. Thank you.
    Last edited by ericrichard25; 09-20-2014 at 12:12 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to name cells automatically using top row and left column entries

    This sounds like a job for dynamic named ranges.

    See them at
    http://www.myonlinetraininghub.com/e...c-named-ranges or
    http://www.bettersolutions.com/excel...G820716330.htm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to name cells automatically using top row and left column entries

    Hi, welcome to the forum

    To name a range of "ranges" in 1 go is fairly easy (Not sure how you would get the additional text in the range name if its not in the heading though)

    Highlight the range - including the headings
    Formula tab/Defined Names/Create from selection
    check Top Row, if its not already selected
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Re: How to name cells automatically using top row and left column entries

    Thank you for the welcome FDibbins, and I appreciate your reply. I'm still not sure this is naming each cell using a combination of the top row and the left column, no? I actually don't want to name a range at all, just the individual cells in the table.

  5. #5
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Re: How to name cells automatically using top row and left column entries

    Thank you for your reply MarvinP. I read the links you sent on dynamic named ranges, but I'm not sure how that helps with the naming issue. I don't want to have ranges at all . . . just name the individual cells of the table combining the corresponding entry in the top row with the corresponding entry in the left column.

  6. #6
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Re: How to name cells automatically using top row and left column entries

    Was just informed that the individual cells in the table don't need to be named. Once the ranges Jan and Revenue are defined, I can simply reference the intersection of those ranges as Jan Revenue in my formulas, and Excel will understand the location. Thank you for the help everyone.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to name cells automatically using top row and left column entries

    OK then maybe instead of using names ranges, you could use INDEX/MATCH to bring back the value of the intersect?

  8. #8
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Re: How to name cells automatically using top row and left column entries

    It seems to work fine just using the name of the intersection. In an adjacent cell, I typed in =(Jan Revenue) + 3, and it gave me a value of 10, pulling the 7 from the Jan Revenue cell. For now all I wanted to do was be able to add up Jan Revenue + Feb Revenue, etc., so this is enough to get me over this bump in the road. But this site seems very neat and I will definitely be back to post and hopefully contribute suggestions once I learn a bit more. Thanks again.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to name cells automatically using top row and left column entries

    As long as you got what you need, but keep in mind there are probably functions for this that you are unaware of, that will make things a lot simpler for you

    Looking forward to helping you again

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to name cells automatically using top row and left column entries

    hmm actually, just for the heck of it, can you uplad a small (clean) sample of your workbook, showing what you are working with and what you want?

  11. #11
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Re: How to name cells automatically using top row and left column entries

    There are most definitely functions that I am unaware of : ) I will check out INDEX/MATCH. Take care.

  12. #12
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Thumbs down Re: How to name cells automatically using top row and left column entries

    Sure thing. This is just a sample workbook I was using to experiment. I just want to be able to say, for example, =Jan Revenue * 2 and have it pull that value from those intersecting ranges. I know the cell doesn't have to be named to perform this calculation, but it's easier on the user if it says Jan Revenue instead of, for example, D5.
    Attached Files Attached Files

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to name cells automatically using top row and left column entries

    Thanks.

    Just as an example, assuming your data looks like this...

    A
    B
    C
    D
    1
    Jan Feb Mar
    2
    Revenue
    50
    500
    5000
    3
    Cost
    30
    300
    3000
    4
    Gross Profit
    20
    200
    2000
    5
    6
    Feb
    300
    7
    Cost


    with A6 and A7 being your 2 variable criteria...
    B6=INDEX($B$2:$D$4,MATCH($A$7,$A$2:$A$4,0),MATCH(A6,$B$1:$D$1,0))
    After you have copied that formula, try changing 1 or both of A6 and A7, to see how it pulls in different values, depending on youyr selection.

    For your real data, you would probably have to change the ranges I used

    Now, we can get even fancier by adding drop-down menues to A6 and A7, to avoid typos and make selections easier. If this is something that would interst you, let me know and I can help you set that up too

  14. #14
    Registered User
    Join Date
    09-19-2014
    Location
    Miami, FL
    MS-Off Ver
    Mac 2013
    Posts
    67

    Re: How to name cells automatically using top row and left column entries

    Thank you FDibbins. A drop down menu does sound like a very neat idea, but for now I just want to complete my current project. I am very, very new to excel, but I see the potential it has to make projects much, much more efficient.

  15. #15
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to name cells automatically using top row and left column entries

    Happy to help and thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 02-01-2013, 03:38 PM
  2. Remove cells from column 1 from a entries in column 2
    By Tim8w in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2011, 04:03 PM
  3. Replies: 6
    Last Post: 11-19-2010, 05:04 PM
  4. Macro to automatically fill cells based on previous entries
    By jerinjan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2008, 08:13 AM
  5. Replies: 1
    Last Post: 03-24-2005, 03:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1