Results 1 to 7 of 7

Thread: Excel Question

  1. #1

    Thread Starter
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Excel Question

    I have two worksheets that I export to a new workbook, without the formulas. I did this a few months ago, and have the new workbook saved.

    The data has changed, and we have to export it again!

    My problem was getting the formatting correct for the new sheets.

    As long as it is correct now, couldn't I just paste the new data into each sheet as values?

    Would it be easier to save the present new workbook as a template? Is that how templates work? Right now, I saved the template with the data in it.
    Is this correct?

    To copy the data, I just pasted special - values. Is there a better way?

    We have to redo the first workbook, and do another one for someone else with different values, so I want to eliminate the having to do the formatting that I did once in the future.

    Thanks in advance!
    Last edited by dglienna; Feb 1st, 2005 at 02:55 AM.

  2. #2
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: Excel Question

    Will the formulas paste correctly (ie, will they have good references, etc.)? If they do, you can just do a normal paste (xlPasteAll). Then, to get the values in place of the formulas, just select what you just pasted, copy it again, and paste it as values (xlPasteValues) on top of itself.

  3. #3

    Thread Starter
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel Question

    I didn't think of that. I will give it a try. Thanks.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Excel Question

    What I would do is spend some time making a template based on a copy of the
    formatted spreadsheet, with or without formulas. Then save the template
    without the data in it. Now, whenever I want to re-export data from the
    workbook with all the formulas and data in it, I can paste the data into the
    matching formatted template. I can then create as many formatted empty
    spreadsheets as I want from the new formatted template.

    As long as you dont need the formulas and I am reading the question correctly.

    HTH
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel Question

    That's kind of what I was hoping for. I didn't know if I had to remove the values from the template or not. We have two sheets with 3600 prices on it. One sheet has 1 price per cell, and the other has a price and a size for every two cells. Putting lines around them was brutal, and I don't want to have to do it again.

    I thought that I would only need the one template. Everytime I pasted data into it, I would save it as a workbook, without overwriting the original template. Is this right?

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Excel Question

    You can do this some many different ways it will probably be a matter of preference.

    You can write module code to do the formatting of the sheet upon the
    workbook_open procedure and have it import a text file to fill the data. Then
    save the workbook as a different name. Similar to a template.

    You could do the template procedure I posted earlier.

    You could copy the file and delete the values. Then paste in the new values. And on and on ....
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Excel Question

    I would need to enter 5 values, then recalulate the 2 worksheets, and then export them and format them. I may look into a macro to do it. I'll post back if I run into problems.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width