Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Excel + IF function Help

  • 02-06-2011 01:12PM
    #1
    Registered Users, Registered Users 2 Posts: 8


    I'm trying to use the "=DATE()" function in excell combined with an IF fucntion.

    I have a piece of measuring equipment hooked up to the PC.
    When i press the button on the measuring tool it spits a number into Columb A, and moves down 1 row automagically each time the button is pressed.

    What I want is to put in Columb B a time and date stamp provided the number fed into columb A isn't 0.

    Here is what I've put into B1:
    =IF(A1<>0,"=NOW()",0)

    Putting =NOW() into a blank cell does provide the time, however instead of putting in the time and date when a number is put into columb A, its just writing "NOW()" into columb B.

    Any ideas?
    Any help much appreciated.


Comments

  • Registered Users, Registered Users 2 Posts: 9,845 ✭✭✭py2006


    Not entirely sure how to solve your problem! But I do know that whatever is between the quotes will appear as just text in a cell! So because you have "now()" thats what will appear in the cell.


  • Registered Users, Registered Users 2 Posts: 2,369 ✭✭✭fionny


    py2006 wrote: »
    Not entirely sure how to solve your problem! But I do know that whatever is between the quotes will appear as just text in a cell! So because you have "now()" thats what will appear in the cell.

    This. Plus dont put the = in the =now.

    I would phrase this forumla as:

    =IF(A1="","",NOW())

    Meaning if A1 = Blank
    True = Leave Blank
    False = TIMESTAMP


  • Registered Users, Registered Users 2 Posts: 1,178 ✭✭✭thirtythirty


    I'm trying to use the "=DATE()" function in excell combined with an IF fucntion.

    I have a piece of measuring equipment hooked up to the PC.
    When i press the button on the measuring tool it spits a number into Columb A, and moves down 1 row automagically each time the button is pressed.

    What I want is to put in Columb B a time and date stamp provided the number fed into columb A isn't 0.

    Here is what I've put into B1:
    =IF(A1<>0,"=NOW()",0)

    Putting =NOW() into a blank cell does provide the time, however instead of putting in the time and date when a number is put into columb A, its just writing "NOW()" into columb B.

    Any ideas?
    Any help much appreciated.

    It's treating it as text because of the " " , and so just putting in whatever's written there. Try adding a random letter inbetween the "N" and "O" to test if you want.

    Anyway the solution is to put the forumla as =IF(A3<>0,NOW(),0)

    And don't forget to format the cell as a date, otherwise it'll come out as 40053.23 or something crazy


  • Registered Users, Registered Users 2 Posts: 8 watson.robin


    Ah ha, thank you spottyelephant.

    I thought I'd tried your approach but mustn't have.
    I had tried it with and without the "" around the NOW()

    Thanks all.


Advertisement