+ Reply to Thread
Results 1 to 4 of 4

How to replace a cell with a formula?

  1. #1
    Registered User
    Join Date
    08-25-2011
    Location
    Norco, Ca
    MS-Off Ver
    Excel 2010
    Posts
    18

    How to replace a cell with a formula?

    What I want to do is create a macro and make that macro a button for anyone who opens this page avaiable for use. Let me describe as below. I have an inventory sheet and want to update.
    Column B is current inventory level
    Column C is for incoming inventory
    Column D is for items taken from inventory
    Column E is the new inventory quantity

    What I want is to have the macro do the math to come up with a new inventory quantity in E, then have that quantity replace what is in B and then delete all items in C,D and E, while leaving the new inventory quantity in B. I know I can just sum to come up with a number in E, but how can I make it replace what is in B and then delete everything, getting it ready for the next entry? If I am too vague, please ask for further details. Thanks so much for any help in advance.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to replace a cell with a formula?

    What do you need E for? Couldn't you just make B=B+C-D??
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to replace a cell with a formula?

    Hi wjohn13

    Have no clue what you're after...try this
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    08-25-2011
    Location
    Norco, Ca
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: How to replace a cell with a formula?

    Let me try either of those and let you know. Thanks for the help. I'm sorry for the confusion. Maybe I'm making more of this than needs to be made.

+ 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