+ Reply to Thread
Results 1 to 3 of 3

Conditional Function Help

  1. #1
    Registered User
    Join Date
    09-16-2011
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    30

    Conditional Function Help

    Hi, I have a spreadsheet which occasionally has cells with empty data. The spreadsheet is downloaded daily from an online table so I don't always know where the empty cells are placed (see column A in attached example). I need to write a formula to calculate return data in column B. So far, the best I have is =IF(AND(A3<>"",A2<>""),A3/A2-1,"") but this does not generate the desired result.

    I need help with the first part of the formula. For example, if cell A4 has data but A3 does not have data, I then want the formula to use A2 to calculate returns. For example, (A4/A2-1,""). If A3 has data, then the formula should read (A4/A3-1,"")
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Conditional Function Help

    I would write a function for something like this personally and do it with code (would be cleaner)

    For your regular if statements you would need to have each row be different (longer) than the proceeding one.

    Please Login or Register  to view this content.
    The function I would use is as follows. Then you can just type =FindReturn('cell you want') in the workbook.

    Please Login or Register  to view this content.
    Last edited by Hawkeye16; 03-04-2013 at 01:19 AM.

  3. #3
    Registered User
    Join Date
    09-16-2011
    Location
    Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Conditional Function Help

    Thanks for the reply, I actually created a work around that has been working by creating a 3rd column, =QUERY( A2:A ; "select * where A is not null limit 21" ) and then I get 21 cells with data, and I can run my return formula in a column C

+ 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