+ Reply to Thread
Results 1 to 7 of 7

Automatically Generate dynamic names in Excel (with or without VBA)

  1. #1
    Registered User
    Join Date
    03-20-2015
    Location
    Munich
    MS-Off Ver
    2013
    Posts
    5

    Automatically Generate dynamic names in Excel (with or without VBA)

    Hi,

    I need to find a solution to automatically generate names for specific cells in Excel.
    I have absolutely NO experience at all in VBA or Macros...
    I am using Office Home and Business 2013

    Consider the below table as an example. (The real table is much larger so it would be impossible to create names manually for each cell)

    A B C D E F
    1 Name Surname Contact details Gross revenues Costs Net revenues
    2 Tom Konrad aaa 10 1 9
    3 Tom Smith bbb 20 2 18
    4 Tom Brown ccc 30 3 27
    5 Davis Lewis ddd 40 4 36
    6 Chris Johnson eee 50 5 45

    I need names to be created as followed for each cell :
    C2 name = "Tom Konrad Contact details"
    D4 name = "Tom Brown Gross revenues"
    F6 name = "Chris Johnson Net revenues"
    etc.

    Important : the cell reference for each name should be dynamic (i.e do not contain any $ sign) because :
    the columns headers (line 1) include filters to filter and sort the numbers in each column and I need to use the names to make calculation in other tabs despite the fact that filter and sorting may change
    I will for sure have new lines coming to this table and this should not affect the reference for the names.


    I can't have name and surname in the same cell, they have to stay separated.

    Any clue how I could to this ?

    Thanks a lot for your help !!
    Last edited by tristan_lux; 03-20-2015 at 11:45 AM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Automatically Generate dynamic names in Excel (with or without VBA)

    Do you really want to name every single cell in the table?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    03-20-2015
    Location
    Munich
    MS-Off Ver
    2013
    Posts
    5

    Re: Automatically Generate dynamic names in Excel (with or without VBA)

    Well at least all the ones containing numbers so I can use the names in calculations and formulas later on.
    So in my example Cells D2 to D6 / E2 to E6 / F2 to F6
    But I guess it makes little difference in the end if this represent 500 or 5000 cells..

  4. #4
    Registered User
    Join Date
    03-20-2015
    Location
    Munich
    MS-Off Ver
    2013
    Posts
    5

    Re: Automatically Generate dynamic names in Excel (with or without VBA)

    The idea is to have to possibility to then write the following in a formula:
    "=(Tom Smith Gross Revenues + David Lewis Gross Revenues)-Chris Johnson costs"

    This is just an example which make no sense from an accounting perspective, but for you to get the idea.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Automatically Generate dynamic names in Excel (with or without VBA)

    Do you really need named ranges for the calculations?

    You could use formulas to extract the values you want for the person you want.

  6. #6
    Registered User
    Join Date
    03-20-2015
    Location
    Munich
    MS-Off Ver
    2013
    Posts
    5

    Re: Automatically Generate dynamic names in Excel (with or without VBA)

    Ok open to your suggestions if you think there is a better work around.
    How would you proceed to extract data? I am not an expert but simple VLookup won't work..

  7. #7
    Registered User
    Join Date
    03-20-2015
    Location
    Munich
    MS-Off Ver
    2013
    Posts
    5

    Re: Automatically Generate dynamic names in Excel (with or without VBA)

    So basically I need to have a tool to do the below calculation example

    Gross Revenues of Tom Smith + Gross Revenues of David Lewis - costs of Chris Johnson

    Keeping in mind that :
    - Names and Surnames can't be in the same cell
    - Names and surname are NOT necessarily ordered in alphabetical order
    - I have filters at the top of all columns that may change the position of the financial numbers at any time

+ 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. Looping through an Excel list to generate a dynamic Word document
    By Nabla21 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-30-2011, 09:25 AM
  2. Can Excel generate emails automatically?
    By C Holmes in forum Excel General
    Replies: 3
    Last Post: 05-01-2010, 05:41 AM
  3. How do I automatically generate numbers in Excel-Ex:1,2,3
    By Anne in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-03-2006, 11:05 AM
  4. how can I use excel to automatically generate routine report?
    By scott in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-29-2005, 05:10 PM
  5. [SOLVED] How do I Automatically generate numbers in Word or excel
    By Dave W in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2005, 11:05 AM

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