+ Reply to Thread
Results 1 to 7 of 7

Inserting a written formula using the IF function & cell references

  1. #1
    Registered User
    Join Date
    04-01-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    20

    Inserting a written formula using the IF function & cell references

    I am looking to enter a written formula using cell references/ the IF function. For example,

    If Cell A1 = 5
    A2 = home
    A3 = Heat


    I want to know if cell A1 > 1 (true in this case), the written formula "site=A2 and team=A3" will appear. I have a pretty good understanding of the IF function, however I am not aware of how to insert words that are appropriate with a certain cell. I hope this makes sense, if not, I can try and re word it again lol

    thanks

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Inserting a written formula using the IF function & cell references

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  3. #3
    Registered User
    Join Date
    04-01-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Inserting a written formula using the IF function & cell references

    An example of the information im looking for is provided below.

    What I want is this:
    If cell B1 > 0, I want the formula "site=B4 and team=B2 and p:B3 and p:lineB5 and p:marginB6 and line>=(B7-2.5) and line<=(B7+2.5)" to appear. However instead of the cell references being written, I would like the equation to show up as: "site=home and team=Heat and p:away and p:line<0 and p:margin>0 and line>=-6 and line<=-1"

    Hope this is a little clearer
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-01-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Inserting a written formula using the IF function & cell references

    Any help would be greatly appreciate. Thanks!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Inserting a written formula using the IF function & cell references

    Hi and welcome to the forum

    It looks like you didnt quite finish off the last part (the line part), but take a look at his and extend as needed...

    =IF(B1>0,"Site="&B4&" and team="&B2&" and p:"&B3&" and p:line"&B5&" and p:margin"&B6&" and line")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    04-01-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Inserting a written formula using the IF function & cell references

    Quote Originally Posted by FDibbins View Post
    Hi and welcome to the forum

    It looks like you didnt quite finish off the last part (the line part), but take a look at his and extend as needed...

    =IF(B1>0,"Site="&B4&" and team="&B2&" and p:"&B3&" and p:line"&B5&" and p:margin"&B6&" and line")
    Thankyou very much @FDibbins. Exactly what I was looking for

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Inserting a written formula using the IF function & cell references

    Happy to help. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neet and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

+ 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