+ Reply to Thread
Results 1 to 6 of 6

IF Statement: Replace Cell with True Value

  1. #1
    Registered User
    Join Date
    11-01-2011
    Location
    USA
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    41

    IF Statement: Replace Cell with True Value

    I'd like to have the TRUE value, "XL Moab POD Substrate", replace the text value of H38. Can this be done?

    =IF(OR($F$38="36x48 POD size",$F$38="30x40 POD size",$F$38="42x56 Pod size",F38="48x64 Pod size"),"XL Moab POD Substrate","")
    Last edited by firehousetk; 11-02-2011 at 01:57 PM.

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: IF Statement: Replace Cell with True Value

    Welcome to the forum! All code (including formulas) must be surrounded with code tags so they will display properly. Please edit and use [ code ] and [ / code ] tags, and I'll post your solution afterwards. I can be penalized for replying beforehand... Note: the code tags have no spaces in them.
    Last edited by tlafferty; 11-01-2011 at 12:44 PM. Reason: Further explanation
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Registered User
    Join Date
    11-01-2011
    Location
    USA
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    41

    Re: IF Statement: Replace Cell with True Value

    Please Login or Register  to view this content.
    Thanks very much for the heads-up! I need to read the rules a little more closely.

  4. #4
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: IF Statement: Replace Cell with True Value

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-01-2011
    Location
    USA
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    41

    Re: IF Statement: Replace Cell with True Value

    I should clarify, I think:

    See attached xls. This argument is going to be for a macro so the argument can live anywhere, really.

    I need to change the text that is in cell H38 from "Moab POD Substrate" to "XL Moab Substrate IF the value of the argument,
    Please Login or Register  to view this content.
    is TRUE.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: IF Statement: Replace Cell with True Value

    OK - not quite sure yet what all your macro will be doing, but as a start, we can simplify your formula to an array of values instead of repeating $F$38 for each test:
    Please Login or Register  to view this content.
    If there will eventually be more than these values, I'd suggest a lookup table to a named range such as Products
    Please Login or Register  to view this content.
    I'm also wondering if you could explain only examining $F$38, but I'm betting a chance to look at your code could solve that problem.

    Will you be iterating through the column marked sub and replacing values?

+ 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