+ Reply to Thread
Results 1 to 9 of 9

Add Funtion to cell

  1. #1
    Registered User
    Join Date
    05-17-2015
    Location
    Bakersfield, CA
    MS-Off Ver
    Mac
    Posts
    42

    Add Funtion to cell

    Why is this not working?


    Please Login or Register  to view this content.
    I want the VBA to drop the funtion "N10 + P10" into Cell O10 if Cell B2 contains the name CanPlus 750

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: Add Funtion to cell

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    05-17-2015
    Location
    Bakersfield, CA
    MS-Off Ver
    Mac
    Posts
    42

    Re: Add Funtion to cell

    I actually need that to run automatically. Such as whenever there is a change on the sheet.

    How do I do that?

  4. #4
    Registered User
    Join Date
    05-17-2015
    Location
    Bakersfield, CA
    MS-Off Ver
    Mac
    Posts
    42

    Re: Add Funtion to cell

    Nevermind. I got that to work. But how do i get it to remove the formula if that B2 doesn't contain "CanPlus 750"?

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Add Funtion to cell

    Please Login or Register  to view this content.
    Seems like a dubious use of VBA ...
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    05-17-2015
    Location
    Bakersfield, CA
    MS-Off Ver
    Mac
    Posts
    42

    Re: Add Funtion to cell

    Well ****. Now it's throwing up an error. Run-time error'-2147417848 (80010108):': method "Range of object'-worksheet' failed

  7. #7
    Registered User
    Join Date
    05-17-2015
    Location
    Bakersfield, CA
    MS-Off Ver
    Mac
    Posts
    42

    Re: Add Funtion to cell

    It probably is, but I don't know how else doing it.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Add Funtion to cell

    How about just a static formula in O10?

    =IF(ISNUMBER(SEARCH("CanPlus 750", B2)), N10 + P10, "")

  9. #9
    Registered User
    Join Date
    05-17-2015
    Location
    Bakersfield, CA
    MS-Off Ver
    Mac
    Posts
    42

    Re: Add Funtion to cell

    That is what I did at first. The problem is, that cell is used to enter data if it isn't a "CanPlus 750"... And I dont think you can input a function into a Cell based on another cells value.

+ 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. [SOLVED] If Search funtion = one cell over
    By imogul in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-29-2013, 02:49 PM
  2. [SOLVED] Cell Duplicating IF Funtion
    By citadel-maritime in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-25-2013, 07:01 AM
  3. Setting Funtion Value to Cell
    By Al in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2006, 07:50 PM
  4. Is there an excel funtion that retreives the last cell of a list
    By Bumblebee in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2006, 05:15 AM
  5. Cell Funtion related to Adjacent cells
    By anjanesh in forum Excel General
    Replies: 6
    Last Post: 06-26-2006, 08:50 PM
  6. how to rec/disp. file name in a w/s cell with a funtion (Auto)
    By Mohan De Silva in forum Excel General
    Replies: 1
    Last Post: 12-20-2005, 09:10 PM
  7. Funtion and Cell
    By henpat in forum Excel General
    Replies: 3
    Last Post: 11-17-2005, 04:40 AM
  8. What funtion does can make one cell bold IF it equals another cell
    By odditie in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 01-08-2005, 07:08 PM

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