+ Reply to Thread
Results 1 to 22 of 22

Filling a cell by taking data from the spreadsheet name

  1. #1
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Filling a cell by taking data from the spreadsheet name

    Good Morning,

    I'm looking to create a formula which I wouldn't be suprised if it was impossible but thought I would ask the question as you lot always seem to have an answer...

    The order system at my workplace we name every order by order number 18650 COMPANY NAME (DESIGN NAME)

    On the first sheet "Factory" we then re-type the DESIGN NAME in to cell C9 without the brackets. Is their a formula I can use to pull the design name from the bracket area of the spreadsheet name? I know this is pretty complex and will understand if its impossible.

    Also Cell E7 is the order number so if it is possible could we take the first 5 characters from the name and put this in the order number box?

    Thank you
    Darren

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Filling a cell by taking data from the spreadsheet name

    Hi Darren,

    Bob Phillips shows how you can use the CELL function to obtain the filename here:

    http://www.xldynamic.com/source/xld.xlFAQ0002.html

    You can use:

    =LEFT(A1,5)

    to extract the first five characters of the name, assuming it is in A1.

    Hope this helps.

    Pete

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Filling a cell by taking data from the spreadsheet name

    Hi cafc_fuller

    Assuming: 18650 COMPANY NAME (DESIGN NAME) is in A1, Try.


    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Filling a cell by taking data from the spreadsheet name

    PL see the attached file with formulas in Sheet1.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    18965 Ross (Test).xlsx

    I have used your formulas on the attached spreadsheet but it don't seem to be working?

    Thanks
    Darren

  6. #6
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    It doesnt work for the order number or the design name....
    Sorry to be a pain but if you do know a formula for this could you have it so if the value is null #VALUE! does not appear?

    Thank you once again for your great work.

    Darren

  7. #7
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Filling a cell by taking data from the spreadsheet name

    Sorry, forgot the order number. =LEFT(A1,FIND(" ",A1)-1)&" "&TRIM(SUBSTITUTE(RIGHT(A1,LEN(A1)-FIND("(",A1)),")",""))

  8. #8
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    This forumla still doesnt work when I put it into the spreadsheet?

  9. #9
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Filling a cell by taking data from the spreadsheet name

    Hi

    Perhaps upload a sample sheet with dummy data.

  10. #10
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    Hi Kevin,

    Please look at my post at 5.23 above - sample sheet is attached.

    Thanks
    Darren

  11. #11
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Filling a cell by taking data from the spreadsheet name

    You don't have anything in cell A1 - that's why you are getting the error.

    Pete

    EDIT: Also, it's better to refer to post numbers, as the times adjust to suit local time (the post you referred to was as 10:23 am for me).
    Last edited by Pete_UK; 11-14-2012 at 06:39 AM.

  12. #12
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    Thank you Pete, sorry I am a little confused as to why it matters that their is nothing in cell A1.
    I thought i would have to put the formula which Kevin supplied into the design reference/order number box....

    Thanks

  13. #13
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    Sorry i understand that the values need to be in A1 now and then it can take the data from this.
    However how do i get A1 to get the data from the name of the spreadsheet?

  14. #14
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Filling a cell by taking data from the spreadsheet name

    Sorry, but what sheet should I be looking at, perhaps it is me.

  15. #15
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Filling a cell by taking data from the spreadsheet name

    Yes, but read post #3 again - that formula is expecting this string:

    18650 COMPANY NAME (DESIGN NAME)

    to be in A1. If that's the name of your file, then you can put the formula that I pointed you to in Bob's site (in post #2) to retrieve the filename in cell A1 (behind your logo).

    Hope this helps.

    Pete

  16. #16
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    Yep this works - sorry for the confusion.
    The only problem i have is that the name is including .xlsx at the end so the Design reference is displaying as text.xlsx

    Is their anyway to remove this?

    Thanks
    Darren

  17. #17
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Filling a cell by taking data from the spreadsheet name

    Use:

    =LEFT(A1,LEN(A1)-5)

    to remove the extension.

    Hope this helps.

    Pete

  18. #18
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    Hi Pete,

    I have used the forumla in A1 to take the file name, however this includes the file extension ".xlsx"
    This is what I would like to remove as this is included in the design reference box?
    It is not just taking the data from the brackets the forumla also takes the file extension?

    Thank you
    Darren

  19. #19
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    Sorry i must of typed whilst you did this post thank you so much!

  20. #20
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    HI Pete,

    I am really sorry - i just can't get this to work....

    How do i merge these together to stop the file extension appearing?
    =TRIM(SUBSTITUTE(RIGHT(A1,LEN(A1)-5)-FIND("(",A1),")",""))
    =LEFT(A1,LEN(A1)-5)

    Thanks
    Darren

  21. #21
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Filling a cell by taking data from the spreadsheet name

    Post your A1 cell formula


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  22. #22
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Filling a cell by taking data from the spreadsheet name

    Thank you for all your help everyone, i stopped being stupid and worked it out!
    Thank you
    Darren

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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