+ Reply to Thread
Results 1 to 15 of 15

returning something in a cell if another cell has info input

  1. #1
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690

    returning something in a cell if another cell has info input

    hi guys

    im trying to get my spreadsheet to return the word unit if cell a18=1 or the word units if its over 1 but i also want the cell to remain empty if there is nothing input into cell a18 is this possible

    help gratefully received

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    Quote Originally Posted by stevesunfold
    hi guys

    im trying to get my spreadsheet to return the word unit if cell a18=1 or the word units if its over 1 but i also want the cell to remain empty if there is nothing input into cell a18 is this possible

    help gratefully received
    place this in B18 for example
    =if(a18=1,"yep","")

  3. #3
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    hi dave but what if it is 2 or more

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    Quote Originally Posted by stevesunfold
    hi dave but what if it is 2 or more
    Oh,
    Do you want the the number changed to words in a different cell?
    like
    one for 1
    two for 2
    three.....

  5. #5
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    hi dave
    no
    if a18=1 then i want the word "unit" to appear in cell a19
    but if a18>1 then i want the word "units" in cell a19
    and if there is nothing input in cell a18 then i want a19 to remain blank


    thanks for your time

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    Quote Originally Posted by stevesunfold
    hi dave
    no
    if a18=1 then i want the word "unit" to appear in cell a19
    but if a18>1 then i want the word "units" in cell a19
    and if there is nothing input in cell a18 then i want a19 to remain blank


    thanks for your time
    Sure...
    try this,
    =IF(A1=1,"Unit",IF(A1>1,"Units",""))

  7. #7
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    dave

    youre a star thanks so much thats spot on

  8. #8
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    i have the same problem whereas i want whats in cell d13 on sheet 1 to appear in cell a19 on sheet 2 but again if its empty i want the 2nd sheet to remain empty

    thanks dave
    sorry to be a pain

  9. #9
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    dave

    please?

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

    In sheet2 A19:

    =If(sheet1!D13="","",Sheet1!D13)
    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.

  11. #11
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    NBVC THANKS ALOT
    IVE THINK IVE DONE THIS THE WRONG WAY ROUND BECAUSE
    WITH THAT FORMULA IN A19 ( =If(sheet1!D13="","",Sheet1!D13)
    ) IM NOW GETTING THE PREVIOUS QUESTION ABOUT UNITS AND UNIT IN ALL MY CELLS AND ITS NOT STAYING BLANK

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I'm not sure what you mean..

    My formula will put what is in Sheet1, cell D13 in Sheet2, cell A19.... is that wrong?

    If so, what exactly do you need?

  13. #13
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    IN CELL A19 OF SHEET 2 I WANT IT TO RETURN THE DATA IN CELL D13 OF SHEET1 WHICH IT DOES

    IN CELL B19 OF SHEET 2 I HAVE THIS FORMULA IN IT =IF(A19=1,"Unit",IF(A19>1,"Units",""))

    BUT I WANT CELL B19 TO REMAIN EMPTY IF THERE IS NOTHING IN A19 IN IT

    MAYBE BECAUSE THERE IS A FORMULA IN A19 IT IS ALWAYS RETURNING THE WORD UNITS RATHER THAN BEING BLANK

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Change your formula in B19 to:

    =IF(A19=1,"Unit",IF(AND(A19<>"",A19>1),"Units",""))

    Excel sees a blank (which is text string) as greater that a number....so you have to work around it.

  15. #15
    Forum Contributor
    Join Date
    06-23-2007
    Posts
    690
    absolutely superb

    i really appreciate it very much

    thanks guys

    i promise not to bug you anymore today guys

+ 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