+ Reply to Thread
Results 1 to 4 of 4

Saving files without formulas attacthed to figures

  1. #1
    Registered User
    Join Date
    09-04-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2013
    Posts
    52

    Question Saving files without formulas attacthed to figures

    Hi all, I have a macro which updates data sets and then save each individual data set to a designated folder. I need the macro to update the data sets, then remove the formulas attached to the figures in the sets before saving them to their specific folders... any ideas? Thanks in advance for any help

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Saving files without formulas attacthed to figures

    You can have a macro Select All and Copy/Paste Special/Values only. Record yourself performing these steps, then put that code in the BeforeSave section of "ThisWorkbook"

    Just be careful to set the macro to enable saving with formulas first

    Please Login or Register  to view this content.
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  3. #3
    Registered User
    Join Date
    09-04-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2013
    Posts
    52

    Re: Saving files without formulas attacthed to figures

    That is exactly what I am trying to achieve. I am new to macro and am confused as to where exactly to put the copy/paste special coding. I currently have this code..

    Sub Macro3()
    '
    ' Macro3 Macro
    '
    '
    ChDir _
    "X:\filelocation"
    Workbooks.Open Filename:= _
    "X:\filelocation.xlsm" _
    , UpdateLinks:=0
    ActiveCell.Offset(-1, 0).Range("A1").Select
    ActiveCell.FormulaR1C1 = "variable"
    ActiveCell.Offset(1, 0).Range("A1").Select
    ChDir "X:\filelocation"
    ActiveWorkbook.SaveAs Filename:= _
    "X:\filelocation\variable.xlsx", _
    FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False

  4. #4
    Registered User
    Join Date
    09-04-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2013
    Posts
    52

    Re: Saving files without formulas attacthed to figures

    Okay so found out this copy/paste special code works, almost.. the colours of highlighted cells aren't copied to the relevant cells....

    ActiveCell.Offset(1, 0).Range("A1:S84").Copy
    ActiveCell.Offset(1, 0).Range("A1:S84").PasteSpecial Paste:=xlPasteValues
    ActiveCell.Offset(1, 0).Range("A1:S84").PasteSpecial Paste:=xlPasteFormats

+ 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. [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
  2. Conversion of an array of figures inputted into cells as word figures to Excel figures
    By Allan Simpson730 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-08-2013, 07:25 AM
  3. Replies: 1
    Last Post: 02-19-2010, 06:08 PM
  4. How to update the figures via formulas
    By MissLotus in forum Excel General
    Replies: 1
    Last Post: 07-09-2009, 10:57 PM
  5. Saving input figures.
    By glenn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2005, 08:05 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