+ Reply to Thread
Results 1 to 4 of 4

How to fill a cell with formula if condition fulfilled

  1. #1
    Registered User
    Join Date
    12-26-2012
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    38

    Question How to fill a cell with formula if condition fulfilled

    Hello masters,

    I need help, I need vba code to do this:
    If I enter value on column C1 and D1 then I would like column E1 automatically filled with formula like "=(C1*D1)-((C1*D1)*10%)" and so with the next row but only if i enter the value on c and d, if nothing entered then the formula is not needed.
    Please help me.

    Thank you

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: How to fill a cell with formula if condition fulfilled

    You could try a formula like this

    Please Login or Register  to view this content.
    Don't know what your decimal separators are "," or "." or if you use ";" or "," but I guess the later. Test if it works.

    Alf
    Last edited by Alf; 02-07-2013 at 03:21 AM. Reason: modify for negative values

  3. #3
    Registered User
    Join Date
    12-26-2012
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    38

    Re: How to fill a cell with formula if condition fulfilled

    thank you for your reply mr. Alf, I don't want to put the formula manually on the cell I want to use vba code to insert the formula and copy the validation from row above.
    would you please help me with that?

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: How to fill a cell with formula if condition fulfilled

    Well then you could try a macro like this.

    Please Login or Register  to view this content.
    Alf
    Last edited by Alf; 02-07-2013 at 06:26 AM. Reason: trimming formula

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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