Formula to return cell value in Excel

Closed
jt13 Posts 1 Registration date Friday February 2, 2018 Status Member Last seen February 2, 2018 - Updated on Feb 2, 2018 at 02:18 PM
BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021 - Feb 2, 2018 at 03:43 PM
Hello,





I am trying to configure a formula that returns the value of a cell if is not blank. For example, if d2 is blank enter nothing, if not null enter value in d2.

1 response

BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021 149
Updated on Feb 2, 2018 at 04:02 PM
I assume you want the formula to be in cell D2. Also, Im not sure this answer is correct as you dont really say if you want a different cell to have this formula, but assuming I'm right here then Im not sure you can do this meaningfully, because as soon as you enter a value into D2 it will overwrite the formula. But this works ... sort of. It adds the words 'Your Default Input' into cell D2 until you overwrite it.

=IF(D2="","Your Default Input")


or if you want to enter the contents of another cell (I used contents of A1 in this example) then

=IF(D2="",A1)


Perhaps you should investigate a macro, which will need a button to activate it, so isnt ineractive.

Really we need more information - the data you need to display, the target cell, the cell where the formula will be placed, and the cell where the information you want to display if D2 is empty.

0