+ Reply to Thread
Results 1 to 18 of 18

Naming cells using info from multiple nearby cells

  1. #1
    Registered User
    Join Date
    08-31-2022
    Location
    Sydney, Australia
    MS-Off Ver
    365
    Posts
    8

    Naming cells using info from multiple nearby cells

    Hi All

    I have a huge number of cells to name. The naming nomenclature is very fiddly - have a look in the example I've added. each name drawn on section and item numbers/letters in this case CH (for all in this sheet) then 1.2 (the section header at the top) then a to f (in the first column, it's an item number from an external document) then a number - mostly 1 or 2 (in in second column, another external doc ref) then a shortened description of the question (i.e. in the third column), then then a suffix to indicate which of three answer fields is used (e.g. data just in reporting period, cumulative data, or comment)

    So given all this info in the name comes from nearby cells - I'm wondering if it is possible to set up a formula (or macro??) to write the names (or at least part of the name) and apply them to the cells instead of typing them all.

    I'm grateful for any ideas!

    thanks
    &Roo
    Attached Files Attached Files
    Last edited by &Roo.public.servant; 09-02-2022 at 01:46 AM.

  2. #2
    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
    53,044

    Re: Naming cells using info from multiple nearby cells

    Take a look at Define Names (Formulas/Defined Names) which will create named ranges using adjacent cells for the names.
    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

  3. #3
    Registered User
    Join Date
    08-31-2022
    Location
    Sydney, Australia
    MS-Off Ver
    365
    Posts
    8

    Re: Naming cells using info from multiple nearby cells

    Thanks FDibbins, however I'm not sure this helps. I don't need to name a range of cells, I need to name individual cells using a defined nomenclature. The 'name' of each cell could be derived from information in nearby cells e.g. by using a formula - the formula output being the text of the 'name' (nearby cells as formula input). However I cannot work out any way to turn a formula output into an actual cell name.

  4. #4
    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
    53,044

    Re: Naming cells using info from multiple nearby cells

    upload a sample WB showing what you are working with, and what you want, please.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,215

    Re: Naming cells using info from multiple nearby cells

    I think you'd need VBA for this, but as Ford has said, provide a sample workbook and we can take it from there.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    08-31-2022
    Location
    Sydney, Australia
    MS-Off Ver
    365
    Posts
    8

    Re: Naming cells using info from multiple nearby cells

    I did with the original post, is it not visible to you/others? I'm not sure what I've done wrong if you cant see my example. Maybe I should have named it something more specific than "example for excel forum.xlsx"
    Last edited by AliGW; 09-02-2022 at 01:45 AM. Reason: Please DON'T quote unnecessarily!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,215

    Re: Naming cells using info from multiple nearby cells

    Oops - so you did. Not enough coffee yet!!!

    Had a look and can't see how it helps.

    See my instructions above about what a sample workbook should show us. Thanks.

  8. #8
    Registered User
    Join Date
    08-31-2022
    Location
    Sydney, Australia
    MS-Off Ver
    365
    Posts
    8

    Re: Naming cells using info from multiple nearby cells

    Thank you for helping Ali

    I definitely did upload an attachment, to be sure I have now removed it and attached it again. its named "example for excel forum.xlsx" Here is a screen snip showing what I see...
    Attached Images Attached Images

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,215

    Re: Naming cells using info from multiple nearby cells

    Yes - I've looked at it. Please re-read post #7.

    You need to manually mock up something that shows us what you are trying to do.

  10. #10
    Registered User
    Join Date
    08-31-2022
    Location
    Sydney, Australia
    MS-Off Ver
    365
    Posts
    8

    Re: Naming cells using info from multiple nearby cells

    Hi Ali -did you look at the cell that I have named -they are the grey cells where a response to the question gets filled in. If you look at the cell names that are there you can see how that name is build from info in the surrounding cells.

    To use an analogy if I were naming a bunch of cells in a series of novels say the 'name would look something like "Title_chapter_page_element_detail" am I making sense?

    I'm really not sure how else to explain it - I'm not trying to do an analysis at this point, just to get all my data collection set up so I can analyse easily later. Think of the spreadsheet like it's a questionnaire (which it is). The questionnaire will be completed every 6 months by the same respondents as they report on their progress. Labeling each cell where they give response will enable easy comparisons as the project progresses and the 6 monthly reports accumulate.

    Because the cell names are formulaic - much like a street address - there should be an easier way than manually typing each one.

    I'm guessing I'll need to repost this is the VBA group, is there a way to transfer the whole string?

    thanks again!

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,215

    Re: Naming cells using info from multiple nearby cells

    I'll move the thread for you now - I can't help with VBA, but someone else will.

  12. #12
    Registered User
    Join Date
    08-31-2022
    Location
    Sydney, Australia
    MS-Off Ver
    365
    Posts
    8

    Wink Re: Naming cells using info from multiple nearby cells

    Thanks heaps for moving the thread for me Ali

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,215

    Re: Naming cells using info from multiple nearby cells

    No worries.

  14. #14
    Forum Contributor
    Join Date
    07-21-2021
    Location
    Norfolk, UK
    MS-Off Ver
    Excel 2003, 2007, 2013, 2019
    Posts
    215

    Re: Naming cells using info from multiple nearby cells

    I have reviewed the 'Names' in your workbook.

    Your workbook does not offer a clear and simple order for processing (e.g. every cell in a particular column) nor is their a clear key for naming any individual cell. Without this it will be very difficult to offer an automated process.

    Is there any further information you can offer that will help?
    Last edited by swaatacba; 09-02-2022 at 03:09 AM.
    Regards,

    Stephen

  15. #15
    Registered User
    Join Date
    08-31-2022
    Location
    Sydney, Australia
    MS-Off Ver
    365
    Posts
    8

    Re: Naming cells using info from multiple nearby cells

    Thanks Steven - I appreciate your advice.
    Even if it's possible to automate part of the cell name it would hep me greatly.
    The cells already named were done so manually, and there is a component that is not done by algorithm - however that can be changed!
    Frankly even if I could get part of each cell name done automatically it would save me a huge amount of time and frustration.

    Please consider cell D10 (I've pasted an image in for convenience - it's from t same as the attached workbook)
    I've colour coded the components of the cell name and where they come from on the work sheet (CH is the first two letters of the name of the Sheet - not shown).
    The only part that could not be derived by algorithm is the fewest pertinent words to describe the metric "Number of potential clients provided education and tailored client advice."
    I could change this easily change this - it could instead be the first 3 letters of each word e.g. "Num_of_pot_cli_pro_edu_and_tai_cli_adv"

    tempsnip.png

    Perhaps you could also advise me on the best way to set up for analysis in the future: should each cell name cell also include a reference to the data reporting period (which is every 6 months).
    As the data comes in I'll need to look for trends and relationships and graph change over time (time being the reporting periods).

    If that last bit is too basic - perhaps you can point me to recommended resource and I'll educate myself. I've not been able to find something sufficiently detailed but not overwhelming.

    Again thank you!

  16. #16
    Forum Contributor
    Join Date
    07-21-2021
    Location
    Norfolk, UK
    MS-Off Ver
    Excel 2003, 2007, 2013, 2019
    Posts
    215

    Re: Naming cells using info from multiple nearby cells

    I have a very busy day today. I'll consider this again in 24 hours.

  17. #17
    Forum Contributor
    Join Date
    07-21-2021
    Location
    Norfolk, UK
    MS-Off Ver
    Excel 2003, 2007, 2013, 2019
    Posts
    215

    Re: Naming cells using info from multiple nearby cells

    I have now looked at your response #15 in some detail and cannot suggest a suitable way of automating the naming of the required cells.

    On the other hand you have already done the hard work. Why not treat this a template and reuse it annually?

    This second half of your post is separate topic and deserves new post of its own with supporting documentation.

  18. #18
    Registered User
    Join Date
    08-31-2022
    Location
    Sydney, Australia
    MS-Off Ver
    365
    Posts
    8

    Re: Naming cells using info from multiple nearby cells

    Thanks swaatacba

    That is disappointing, the example shown is just a small portion of the the entire spreadsheet which mostly still needs to be done, and then becomes the template for annual use.

    That there is no simple way to automate the naming of cells explains why I can't find appropriate training resources.

    I appreciate the time you've taken to consider this for me.

+ 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. multiple sheets and naming cells
    By Bell_1515++** in forum Excel General
    Replies: 2
    Last Post: 03-31-2016, 01:38 AM
  2. Naming cells on multiple worksheets
    By data_pig in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-21-2015, 01:31 PM
  3. format multiple cells if 2 cells have specific info
    By compgeek1979 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-16-2015, 02:56 PM
  4. Sum cells along a row based on nearby cell values using a formula
    By mwhelan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-24-2014, 04:49 AM
  5. Replies: 1
    Last Post: 12-12-2012, 05:33 PM
  6. [SOLVED] Naming Multiple Cells
    By gowander in forum Excel General
    Replies: 5
    Last Post: 08-08-2012, 02:48 PM
  7. Replies: 1
    Last Post: 05-29-2012, 01:04 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