+ Reply to Thread
Results 1 to 4 of 4

Simple if,else constructs

  1. #1
    Registered User
    Join Date
    07-09-2008
    Location
    Oregon
    Posts
    2

    Simple if,else constructs

    Hi,

    I have thousands of rows with either 2 or 4 cells each like this

    stuff stuff stuff stuff
    stuff stuff stuff stuff
    stuff stuff
    stuff stuff
    stuff stuff stuff stuff

    The stuff in bold is what i want to keep in cell 5 and 6, ie:

    for each row
    if column 3 & 4 have stuff in them
    column 5 & 6 = column 3 & 4
    else
    column 5 & 6 = column 1 & 2

    I have limited knowledge of excel. With my naive mind, here's what i thought.. but of course it didnt work:

    click into cell 5 of a row A (A5) and write: = A3 if(A3 != null), else A1

    Seems like it should be really simple, but after 25 min on Google, I haven't found anything.

    Thanks for any help!

  2. #2
    Registered User
    Join Date
    07-09-2008
    Location
    Melbourne
    Posts
    33
    Cell E1 =IF(ISBLANK(C1),A1,C1)

    CEll E2 =IF(ISBLANK(D1),B1,D1)

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565
    Hi minulescu,

    Assuming the data starts at row 2 (row 1 being for headers), put the following formula in cell E2...

    =IF(AND(ISBLANK(C2),ISBLANK(D2)),A2,C2)

    ... and this formula in cell F2

    =IF(AND(ISBLANK(C2),ISBLANK(D2)),B2,D2)

    and copy down as required.

    HTH

    Robert

  4. #4
    Registered User
    Join Date
    07-09-2008
    Location
    Oregon
    Posts
    2
    That was simple enough!

    Thank you guys very much!

    Is there a shortcut to copy all the way down?
    Last edited by minulescu; 07-09-2008 at 08:41 PM.

+ 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