+ Reply to Thread
Results 1 to 6 of 6

Excel cuts off part of formula

  1. #1
    Registered User
    Join Date
    03-08-2018
    Location
    Lochristi, Belgium
    MS-Off Ver
    2010
    Posts
    5

    Excel cuts off part of formula

    I am working in an excel file named "Stuurprogramma.xlsm"

    I am allowing other documents to copy the formula of a certain cell, yet when I try to enter a cell adress in the document
    it cuts off the file-specific part of the adres so other files start to look in their own file instead of in the 'mother' file, example underneath:

    Input before pressing enter: '[Stuurprogramma.xlsm]Sheet1'!$B$12

    Output after entering: Sheet1!$B$12

    Can I turn off a setting that does this?
    Thanks in advance.
    Last edited by Thibaut Br; 03-08-2018 at 10:46 AM.

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Excel cuts off part of formula

    If Stuurprogramma.xlsm is in a different directory than the default directory, then the path must be included.
    example
    Please Login or Register  to view this content.
    Also noticed you did not use the = symbol in your post. I assuem it is used on the worksheet when entering the formula.
    Last edited by JLGWhiz; 03-08-2018 at 12:59 PM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Excel cuts off part of formula

    or, even more simply...

    ='[Stuurprogramma.xlsm]Sheet1'!$B$12
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    03-08-2018
    Location
    Lochristi, Belgium
    MS-Off Ver
    2010
    Posts
    5

    Re: Excel cuts off part of formula

    I don't think you understand the issue, I know I have to write down the file name when entering it into another document. The problem is that it vanished when I tried to enter the formula since Excel kept deleted the file directory part since it was about the file in which I entered the formula. The formula: INDIRECT("[Stuurprogramma.xlsm]"&"Sheet1!$B$12") did the trick for me. It didnt remove the file directory when pressing enter. Thanks anyway!

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Excel cuts off part of formula

    Maybe you didn't describe it very well!! Incidentally, INDIRECT will only work as long as the source file is OPEN.

    What happens when you copy cell B12 from Stuurprogramma.xlsm and paste/paste special/paste link??

  6. #6
    Registered User
    Join Date
    03-08-2018
    Location
    Lochristi, Belgium
    MS-Off Ver
    2010
    Posts
    5

    Re: Excel cuts off part of formula

    Ok so, the problem was: when I wrote "='[Stuurprogramma.xlsm]Sheet1'!$B$12" in the Excel formula tab in the file "Stuurptogramma.xlsm", it deemed the file location that I wrote into the formula tab to be unnecessary. So when I pressed enter to activate the formula, it converted it to "=Sheet1!$B$12"" which worked fine into the file "stuurprogramma" but once I used a macro to copy that cell content to another file , the new file ofcourse did not know in what file the cell B12 was located. That was my problem.

    I am approaching the macro from another point of view so the issue that I had no longer bothers me, I now don't work via a controlling file (this was "stuurprogramma.xlsm"). Anyway, thanks for your input! I am new to cross feeding information with macro's (new to macro's in general aswell) so my initial approach was apparently not the right way to go.

+ 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. SHORT CUTS in Excel 2010
    By Terryz in forum Excel General
    Replies: 4
    Last Post: 10-23-2015, 12:54 PM
  2. [SOLVED] Saving Excel to PDF: underline cuts into figures
    By {=OR(value=array)} in forum Excel General
    Replies: 5
    Last Post: 03-06-2014, 03:32 PM
  3. Create a macro in Excel which cuts a seleted row
    By satyas462 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 10-14-2010, 11:48 AM
  4. problem with excel 2007 short cuts
    By ram2008 in forum Excel General
    Replies: 0
    Last Post: 11-19-2008, 08:40 PM
  5. Excel print in CutePDF cuts off
    By mario in forum Excel General
    Replies: 0
    Last Post: 08-04-2006, 12:35 AM
  6. [SOLVED] In Excel the Y axis title box cuts off the last letter.
    By maggie in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 07-19-2006, 08:45 PM
  7. Excel query via ODBC cuts values
    By escelinen in forum Excel General
    Replies: 1
    Last Post: 01-23-2006, 01:40 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