+ Reply to Thread
Results 1 to 4 of 4

How to iterate an if statement

Hybrid View

  1. #1
    Registered User
    Join Date
    01-18-2012
    Location
    New Orleans
    MS-Off Ver
    Excel 2007
    Posts
    3

    How to iterate an if statement

    I am creating a worksheet that looks up member sizes from a user input. I have made it so that when the user types in the beam size it returns "doesn't exist" or the dimensions of the beam in number form. Now i want the numbers to appear in a cell but i cant figure out how to write the formula the way i want it. Basically I need the cell to return:

    =if(a6="doesn't exist", if(a7="doesn't exist", if(a8="doesn't exist" .... this continues until next cell is empty or if it encounters a number in which case i want it to return that number.

    I'm pretty sure this is easy if you know macros or programming but I dont so please help!

    Thank you,
    AH
    Last edited by NBVC; 01-18-2012 at 05:10 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Returning a the only number from a list of text cells

    Something like:

    =INDEX(A1:A10,MATCH(TRUE,INDEX(ISNUMBER(A1:A10),0),0))

    ajust ranges to suit.

    If it is the only number, then you can also use:

    =SUM(A1:A10)
    Last edited by NBVC; 01-18-2012 at 04:39 PM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    01-18-2012
    Location
    New Orleans
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to iterate an if statement

    Found it already... use =sum(....) and it returns the only number. 2 hours of my life down the tubes.

  4. #4
    Registered User
    Join Date
    01-18-2012
    Location
    New Orleans
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to iterate an if statement

    Thank you for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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