+ Reply to Thread
Results 1 to 6 of 6

if then formula

  1. #1
    Registered User
    Join Date
    06-08-2017
    Location
    united states
    MS-Off Ver
    2013
    Posts
    2

    Smile if then formula

    Hello Friends,

    I'm new here, so looking forward to learning and helping where I can!

    Need to copy value from cell DC2 to O2 if O2 is blank...thank you in advance

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: if then formula

    A cell cannot change the value of itself.
    Can only be done in VBA.

    Please Login or Register  to view this content.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    06-08-2017
    Location
    united states
    MS-Off Ver
    2013
    Posts
    2

    Re: if then formula

    thank you for your help!!!
    Ok so now i know that a cell cannot change the value of itself, but how can I still write the formula on the spreadsheet if using a different cell like C2
    i found several similar topics where other members advised using =IF(ISBLANK(B1),A1,B1) but it didn't work for me....

  4. #4
    Registered User
    Join Date
    01-19-2017
    Location
    Michigan
    MS-Off Ver
    2013
    Posts
    92

    Re: if then formula

    First of all, why didn't it work? Is it returning an error? Not coming back with anything? It basically works like this. If B1 is blank, then return the value in A1, otherwise return the value in cell B1.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: if then formula

    tindinh27 welcome to the forum

    Agree that =IF(ISBLANK(B1),A1,B1) should work, what did you expect and what did you get?
    I would write that as =IF(B1="",A1,B1)
    But it it the exact same thing
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: if then formula

    Put 1 in A1
    In a blank cell type =IF(B1="",A1,B1)

    If the cell doesnt say 1 then B1 is NOT blank, no matter what that it LOOKS like blank, it's not.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  2. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  3. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

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