+ Reply to Thread
Results 1 to 6 of 6

assistance using text and forumula

  1. #1
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    assistance using text and forumula

    hi

    i am trying to add some text in to a calculation however i cant seem to figure it out.

    basically i have the cell to check 1 cell against another cell for a value. if it fails the requirements then i want the output to be (x1)@(x2)
    where
    x1 = (number from cell)
    @ = Text
    x2 = (number-(number*number))

    so far i have this

    =IF(F2>=B2,(C2-E2),IF(B2>D2,"",(C2-(A2*B2))))


    for the last false statment (in bold) i want it to read (B2)@(C2-(A2*B2)

    does that make sense?
    Last edited by twiggywales; 02-09-2012 at 08:13 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: assistance using text and forumula

    Try this:

    =IF(F2>=B2,(C2-E2),IF(B2>D2,"",B2 & " @ " & (C2-(A2*B2))))

    Hope this helps.

    Pete

    EDIT: Actually, if those numeric values could be fractional, you might consider this variation:

    =IF(F2>=B2,(C2-E2),IF(B2>D2,"",TEXT(B2,"0.0") & " @ " & TEXT(C2-(A2*B2),"0.0")))

    which will give you one decimal place only.
    Last edited by Pete_UK; 02-09-2012 at 06:59 AM.

  3. #3
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: assistance using text and forumula

    ok that has added what i need.

    can you explain how this works for me so i dont have to ask questions like this again

    also i assume that if i want to do saem with the fist statement (in bold below)

    =IF(F2>=B2,(C2-E2),IF(B2>D2,"",TEXT(B2,"0.0") & " @ " & TEXT(C2-(A2*B2),"0.0")))

    i would do this

    =IF(F2>=B2,TEXT(B2,"0") & " @ " & TEXT((C2-E2),"0"),IF(B2>D2,"",TEXT(B2,"0") & " @ " & TEXT(C2-(A2*B2),"0")))

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: assistance using text and forumula

    Well, the easiest thing is to try it out, and that seems to me to do what you want.

    As for how it works, the TEXT function converts numeric values into strings, and you can specify the format that you want those values to appear in using a Format string. It is very useful for dates, for example, where you could have this:

    ="Today's date is : "&TEXT(TODAY(),"dd mmm yyyy")

    See what happens if you just have:

    ="Today's date is : "&TODAY()

    Hope this helps.

    Pete

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: assistance using text and forumula

    thanks for this think i am getting the hang of this.

    there are so many functions that i have never even looked at.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: assistance using text and forumula

    You're welcome. Yeah, there are a load of functions that I've never used also.

    Perhaps you can mark your thread as Solved, and maybe click on the star icon on any post that has helped you.

    Pete

+ 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