+ Reply to Thread
Results 1 to 7 of 7

usin < as part of my data

  1. #1
    Registered User
    Join Date
    12-08-2011
    Location
    Manteca
    MS-Off Ver
    Excel 2003
    Posts
    6

    usin < as part of my data

    ok, so I am a self taught excel student so bear with me. I have a column of data and some are regular numbers ... 1.5 2.6 1.0 0.9 etc, but some are <1.2 <1.9 <2.5... now how can I make a formula that will multiply this data with data from an adjcent column and a constant of 8.34. I want the actual number after the < to be used in the product, and can I make my answer force a < symbol when there is one being used in the calculation... I hope this makes sense.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: usin < as part of my data

    Try:

    =IF(LEFT(A1)="<","<","")&SUBSTITUTE(A1,"<","")*B1*8.34

    or

    =IF(LEFT(A1)="<","<"&MID(A1,2,10)*B1*8.34,A1*B1*8.34)

    The latter will keep the numbers as numbers instead of convert to text if the column A cell doesn't have a "<".
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-08-2011
    Location
    Manteca
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: usin < as part of my data

    Im so excited it worked. thanks... so i decided to try the second equation first and works great. is there a way to get the result to only show whole number unless the value is less than 10, then would only have one decimal... thanks your awsome

    when I use the second method, the cells that use all numerical values keep the format to show no decimals, but the ones that use the < all show the decimals.

    any ideas?
    Thanks
    Last edited by sandraleeann; 12-08-2011 at 06:34 PM. Reason: to add info

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: usin < as part of my data

    Is this do you mean??

    =IF(LEFT(A1)="<","<","")&TEXT(SUBSTITUTE(A1,"<","")*B1*8.34,"[<10]0.0;-0;0")
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: usin < as part of my data

    The second part of your post seems to be a different question than the first part... it seems that Haseeb has given you solution for the first part...

    for second part (if a different question) try: =IF(LEFT(A1)="<","<"&MID(A1,2,10)*B1*8.34,ROUND(A1*B1*8.34,0))

    this rounds the number to the next whole number if A1 contains only a number... but it will keep decimals if A1 starts with "<"

  6. #6
    Registered User
    Join Date
    12-08-2011
    Location
    Manteca
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: usin < as part of my data

    Thanks.
    Haseeb's solution is what I was looking for. But now another issue. when I want to make an average of these cells, it gives me div#/0 error. any ideas?
    I have also tried to sum the cells but that gives zero as well
    Last edited by sandraleeann; 12-13-2011 at 02:10 PM.

  7. #7
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: usin < as part of my data

    Try this ARRAY FORMULA, must hit CTRL+SHIFT+ENTER, rather than just ENTER.

    =AVERAGE(IF(ISNUMBER(--SUBSTITUTE(0&C1:C10,"<","")),--SUBSTITUTE(0&C1:C10,"<","")))

    If you can attach a dummy file would be helpful.

+ 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