+ Reply to Thread
Results 1 to 4 of 4

trying to do an -- if then else statemnet with different cells

  1. #1
    Registered User
    Join Date
    10-15-2007
    Posts
    7

    trying to do an -- if then else statemnet with different cells

    I have data in one cell that I want to repeat based on the input to another cell otherwise I want to enter different data. for example -- a name in j117 that I may want to repeat in d140 or I may want to enter different data in d140 depending in the 'yes' or 'no' input in cell a140.
    If a140 = yes then the cell d140 = the value in j117
    if a140 = no then the cell d140 is blank and I can enter different data without overriding the formula
    where is the formula to be placed? in d140 or in a different cell? I tried putting an 'if' formula in B140 so I could still enter data in d140 but that did not work
    any ideas?

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: trying to do an -- if then else statemnet with different cells

    For the output of the IF statement to affect D140, then the IF statement formula must be in D140. If you overtype data into D140, the formula is then gone.

    So, one potential solution:
    Enter your 'alternative text' in B140
    In D140 enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: trying to do an -- if then else statemnet with different cells

    1) Formulas can only affect the cell that they are located in.
    2) You cannot have both a formula and allow manual data entry into the same cell.

    The only way to do this is with VBA. Are you open to a VBA (coding) solution? It would require having "macros" enabled for that workbook.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    10-15-2007
    Posts
    7

    Re: trying to do an -- if then else statemnet with different cells

    I have never done VBA but am willing to give it a try.

+ 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] Getting Financial statemnet for mutiple stocks.
    By ctguards1987 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2014, 09:27 AM
  2. [SOLVED] Linking cells globally to allow users the ability to change cells on separate sheet/cells.
    By V1gilante in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-18-2014, 10:47 PM
  3. Replies: 4
    Last Post: 06-17-2011, 08:53 AM
  4. Formula: Drop Down List -> Choose Option Finds Cells & Replace Cells with Cells
    By g00glethis1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2010, 01:10 PM
  5. Replies: 2
    Last Post: 06-24-2010, 04:53 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