+ Reply to Thread
Results 1 to 4 of 4

If value is over X, then change value to Y (How?)

  1. #1
    Registered User
    Join Date
    03-30-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    3

    If value is over X, then change value to Y (How?)

    Hi guys

    I have a pricelist with a stock column that shows the exact stock quantity of a product, however, my update query for my website only works with y and 0 values. 'y' means in stock and 0 means out of stock.

    So basically, I need a formula for that column that says: If a value in this column is GREATER THAN 0, then that value changes to y
    BUT, if a value in this column is equal to 0, then it simply stays 0.

    Extra info: I am using Excel 2010

    All help is appreciated.

    Thanks
    Seth

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: If value is over X, then change value to Y (How?)

    =IF(value>0;"y";0) and copy down.

    Is that what you are looking for?
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Registered User
    Join Date
    03-30-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: If value is over X, then change value to Y (How?)

    Quote Originally Posted by Søren Larsen View Post
    =IF(value>0;"y";0) and copy down.

    Is that what you are looking for?
    Thanks for the help, but unfortunately that gave me an error.

    I think we will have to have an output column.

    So the IF statement will be based on D2 and downwards, and will output the 'y's and '0's into an output column.

    Thanks again for the help.
    Seth

  4. #4
    Registered User
    Join Date
    03-30-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: If value is over X, then change value to Y (How?)

    Done.

    =IF(D2>0,"y",0)

+ 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