Consulting

Results 1 to 3 of 3

Thread: Formula in VBA module

  1. #1
    VBAX Contributor
    Joined
    Apr 2010
    Posts
    182
    Location

    Formula in VBA module

    Hi,

    How would I place the following formula in the worksheet module so that when the user adds data rows to column C, the formula gets copied into column H of the worksheet.

    =IF(F18="","",VLOOKUP(F18,Products!$A$3:$E$1371,IF(O10="Discount",5,5),0))

    and the following gets copied to the column K of the active worksheet.

    =IF(F18="","",VLOOKUP(F18,Products!$A$3:$E$1371,IF(O10="Discount",2,2),0))

    Any help on this would be kindly appreciated.

    Thanks in advance.
    Best Regards,
    adamsm

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Excel 2007? If so, convert it to a table, new rows inherit the formulas.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Contributor
    Joined
    Apr 2010
    Posts
    182
    Location
    Thanks for the help xld. I do really appreciate it.
    Best Regards,
    adamsm

Posting Permissions

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