+ Reply to Thread
Results 1 to 4 of 4

Code to copy values to formula's in other sheets

  1. #1
    Registered User
    Join Date
    02-27-2015
    Location
    Tulum, Mexico
    MS-Off Ver
    2010
    Posts
    2

    Code to copy values to formula's in other sheets

    Dear clever Excel people,

    I would like to be able to have values automatically copied to another sheet into a specific cell and then added to the formula that's in that cell.

    I'll explain why I want to be able to do this:
    I use sheet 1 as a long list to where I always add my expenses. Sheet 2 and 3 etc. are specification sheets of my expenses. For instance, sheet 2 is expenses on the car. In sheet 2 I have different sections, for instance: gas costs. When I add a number that I spent in sheet 1, I would like that number to add up to the number that is in sheet 2 in the cell 'gas costs'. But only ofcourse when I command the number to copy to that specific cell, because I am also adding other numbers, for instance; money spent on laundry.

    Do I have to use macros for this?
    If yes, could someone explain to me how this works?

    Kind regards,
    Michelle

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Code to copy values to formula's in other sheets

    I wouldn't do any of that. Sheet1 should list all your items in a single reference database.

    DATE
    DESCR
    CATEGORY
    GROUP
    AMOUNT

    Once you have that, you can create a Pivot Table to give you totals on any category or group you want, no additional sheets needed.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-27-2015
    Location
    Tulum, Mexico
    MS-Off Ver
    2010
    Posts
    2

    Re: Code to copy values to formula's in other sheets

    Thank you for your reply.
    I chose this lay-out because I want to see all my expenses per day, but also per category in other sheets.
    So what I have at the moment is:
    Sheet one has the description and price of what I bought per day and sheet two has per month the total costs per category.
    Will a pivot table still give me that same clarity? (I am just asking before I am going to change my complete works.. )

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Code to copy values to formula's in other sheets

    Once you build a simple DB like I've described, select all the data, then INSERT > PIVOT Table.

    It's hard to explain until you get in and start playing with Pivot Table features. The flexibility is phenomenal. From that one set of data you can create as many dynamic Pivot tables as you want representing data any way you wish. Costs per item, costs per category, costs per month...

    You can Google pretty much any variation you want and get instant examples.... "Excel Pivot Table Costs per month"... etc.

+ 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. VBA Code to Move and/or Copy Sheets out to a New Workbook based on Cell Values
    By lhickerson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-18-2014, 09:45 AM
  2. Replies: 0
    Last Post: 11-04-2013, 01:48 PM
  3. Replies: 2
    Last Post: 07-19-2013, 02:54 PM
  4. VBA Code to Copy Non Blanks/Cells with Values until Formula returns as blank
    By FLani in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-16-2013, 10:18 PM
  5. Code to write formula in 2 cells, copy, paste values, repeat next row until end of sheet
    By Oly Steel Man in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2013, 11:13 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