+ Reply to Thread
Results 1 to 9 of 9

Save File Using a Range Name

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Hong Kong
    MS-Off Ver
    Office 365 PC Version
    Posts
    216

    Save File Using a Range Name

    Hi,

    I have an open active file and this file contains 2 range names as follows:

    1) The name of a 2nd file to open (i.e. FPOF_Root_Directory_Open)
    2) The name to save the 2nd open file (i.e. FPOF_Root_Directory_Save)

    I tried 2 ways to save the 2nd file, however the method I like to use does not work

    Any help is much appreciated, regards john

    Please Login or Register  to view this content.

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

    Re: Save File Using a Range Name

    Please provide the ranges of the below named range and the cell values of that range

    FPOF_Root_Directory_Open
    FPOF_Root_Directory_Save


    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

  3. #3
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Hong Kong
    MS-Off Ver
    Office 365 PC Version
    Posts
    216

    Re: Save File Using a Range Name

    Hi

    FPOF_Root_Directory_Open and FPOF_Root_Directory_Save are single cell range names.

    FPOF_Root_Directory_Open contains a formula which combines 2 cells and provides the result "C:\Pinnacle-CG\Pinnacle-CG\Financial Projection System 2014\Model\FPOF\FPOF Master.xlsx"

    FPOF_Root_Directory_Save contains a formula which combines 2 cells and provides the result "C:\Pinnacle-CG\Pinnacle-CG\Financial Projection System 2014\Model\FPOF\All1_FPOF.xlsx"

    Thanks for your help John

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

    Re: Save File Using a Range Name

    Replace this

    Please Login or Register  to view this content.
    With

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Hong Kong
    MS-Off Ver
    Office 365 PC Version
    Posts
    216

    Re: Save File Using a Range Name

    Hi

    Thanks for your response.

    I tried this code and that works.

    Please Login or Register  to view this content.
    How to replace the workbook name "FP Master.xlsm" with a range name that contains the same?

    Seems to me I should be able to reference a cell in thisworkbook which provides the name of the file to save the 2nd file?

    Thanks John

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

    Re: Save File Using a Range Name

    Quote Originally Posted by John Vieren View Post
    How to replace the workbook name "FP Master.xlsm" with a range name that contains the same?
    Again whether the named range is a formula cell or just cell Value ?

  7. #7
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Hong Kong
    MS-Off Ver
    Office 365 PC Version
    Posts
    216

    Re: Save File Using a Range Name

    Hi,

    I am using as name range (This_File_Name) in a cel and that cell contains a formula which produces the file name.

    I find it very strange that access to a cell with a formula cannot be valued and the results used?

    Thanks John

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

    Re: Save File Using a Range Name

    Some exercises to you….

    In A1 Cell - Value
    "C:\Pinnacle-CG\FPOF Master.xlsx"

    Using the above will do the job perfectly

    In A1 Cell - Value
    C:\Pinnacle-CG\FPOF Master.xlsx

    Referring the cell value to filename will Not work since the data is missing the Double Quotes

    In A1 Cell - Formula
    ="C:\Pinnacle-CG\FPOF Master.xlsx"

    Referring the above formula cell in code, A1 cell value will looks like C:\Pinnacle-CG\FPOF Master.xlsx and it is also missing the Double Quotes

    Referringthe formula cell reference as .formula will get the result as ="C:\Pinnacle-CG\FPOF Master.xlsx"

    So while using .formula it is returning the = sign also so just ignore the = sign when referring it with .formula

  9. #9
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Hong Kong
    MS-Off Ver
    Office 365 PC Version
    Posts
    216

    Re: Save File Using a Range Name

    Thanks for your help.

    Unfortunately I was not able to make your suggestion work.

    Regards John.

+ 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. Extract range between two values and save as new file
    By GDM69 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2013, 10:09 AM
  2. [SOLVED] Save new excel file from range
    By dalerdd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-15-2013, 04:48 PM
  3. Search range and save to csv file
    By rrmacman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2008, 09:58 AM
  4. File Save As -Selected Range
    By Sprint54 in forum Excel General
    Replies: 1
    Last Post: 02-07-2006, 10:35 PM
  5. reading a range name as part of Save-as file
    By excelnut1954 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2005, 01:38 PM

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