+ Reply to Thread
Results 1 to 4 of 4

IF statement help!

  1. #1
    Registered User
    Join Date
    02-01-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    IF statement help!

    I'm trying to write a formula for my excel document to do the following:
    If the cell contains text, return nothing and continue the search in the cell below.
    If the cell does not contain text, return '1' . Then, move to the next cell and continue search.
    Here's an example of what I want it to look like.

    Issue.jpg

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: IF statement help!

    hi there, welcome to the forum. assuming your data is in column A1:B7 like in the picture, try this in D2:
    =IF(E2="","",1)

    and this array formula in E2:
    =IF(COUNTIF($B$2:$B$7,"")>=ROW(1:1),INDEX($A$2:$A$7,SMALL(IF($B$2:$B$7="",ROW($B$2:$B$7)-1),ROW(1:1))),"")
    for this, you have to paste the formula inside the formula bar & press CTRL + SHIFT + ENTER

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    02-01-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: IF statement help!

    Wow!.. That is amazing. Thank you soo much!

  4. #4
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: IF statement help!

    Hi

    Judging by your comment your problem has been solved, can you help the mods out by marking it as solved.

    Chris
    Click my star if I helped Thanks

+ 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