+ Reply to Thread
Results 1 to 4 of 4

Add a formula to cells with existing data?

  1. #1
    Registered User
    Join Date
    08-02-2011
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    2

    Add a formula to cells with existing data?

    Hi everyone.

    I am going to try to explain this as best I can, without sounding like a loon. Wish me luck!

    So, I have a spreadsheet that has prices in it. What I need to do is add to certain cells, but not get rid of the amount that is already in the cell. It looks something like this:

    135.24
    147.52
    168.98
    etc, etc, etc, no equal signs at the beginning of the cells

    I need to add 10.35 to a handful of cells in various places through the spreadsheet. I guess what I'm trying to ask is if there is a way for me to add to all the cells at the same time so that when you click on the cell you see the math in the formula bar, instead of having to use hidden cells somewhere else on the spreadsheet and just pasting the value in the original cell.

    Alrighty... hope somebody can make some sense of that and help me out. Thanks in advance!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    27,162

    Re: Add a formula to cells with existing data?

    I'm trying to figure out what your underlying need is.

    If you need to add 10.35 to a bunch of cells that are already holding numeric values, do this:
    1. Put 10.35 in a cell
    2. Copy
    3. Holding down the CTRL key, select every cell you want to update
    4. From the menu select Edit, Paste Special, and select Add, then OK
    But that doesn't result in formulas, it updates the values. If you have a value and want to change it to a formula, like

    =135.24+10.35

    then you either have to type it in, or write a macro to do it. This gives you an idea of what is involved:
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-02-2011
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Add a formula to cells with existing data?

    A macro is what I need, I imagine. I've never created one, so wasn't even sure where to begin. I need to be able to see the formulas in the cells though, because the original creator of the spreadsheet will have a conniption if I get rid of her original data.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    27,162

    Re: Add a formula to cells with existing data?

    This could get complicated because I suspect that what you described is only one possibility out of many possible situations.

    How do you decide which cells need to have 10.35 added? Is it always the same? If not, how do you decide?

    Are you always adding 10.35? Or is it sometimes a different number, or sometimes subtracting?

    To do this may require the macro to interact with the user to identify which cells to update and get the value to add.

    It would also help if you described what is actually going on, what business problem are you using this spreadsheet to solve?

    The macro above, for example, could be set up to run every time you double-click on a cell, but you would have to do it individually on each cell you want to change, and enter the value you want to add each time (even if it's the same every time). So that's why I'd like to understand your problem better.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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