+ Reply to Thread
Results 1 to 5 of 5

Add formula if adjacent cell has name in it but remove formula in adjacent cell is blank

  1. #1
    Registered User
    Join Date
    06-25-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2013 / 2016
    Posts
    69

    Add formula if adjacent cell has name in it but remove formula in adjacent cell is blank

    Hi,
    I'm close to what I need but my problem is although I've ammended this code to enter the Rand() formula if a name is entered in the adjacent cell. But it's not removing the formula if I remove the name from col A (I'm building a random draw so the amount of names can change).
    can anyone help please?

    Name col A3:A35

    Formula Col B3:B35



    Please Login or Register  to view this content.
    Last edited by How How; 05-16-2013 at 08:23 AM. Reason: re-word

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Add formula if adjacent cell has name in it but remove formula in adjacent cell is bla

    this seems to work
    Please Login or Register  to view this content.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    06-25-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2013 / 2016
    Posts
    69

    Re: Add formula if adjacent cell has name in it but remove formula in adjacent cell is bla

    Yes Martin, it does....Thanks!!
    1 minor thing........I'm assuming because it's a change event that it will only work if a cell in range A3:A35 is selected after a paste of names or a clear contents action? Is there a way to overcome this (Col B will be hidden), like just add a selection in the code?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Add formula if adjacent cell has name in it but remove formula in adjacent cell is bla

    no idea not a vba man! i do simple things me

  5. #5
    Registered User
    Join Date
    06-25-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2013 / 2016
    Posts
    69

    Re: Add formula if adjacent cell has name in it but remove formula in adjacent cell is bla

    No matter....It was a "nice to have"........Thanks for solving my main prob

+ 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