+ Reply to Thread
Results 1 to 5 of 5

IF array with COUNTIF??????

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    117

    IF array with COUNTIF??????

    Ok, i have an overhead table in a sheet (attached), im going to use dependant dropdown lists for category & sub-category. The next field is receipt number (if applicable) The reason is we assign daily expenses (carpark ticket, fuel, train etc etc) with a receipt number 1,2,3,4 ascending as high as necessary until the next business year when we start a new BLANK workbook template. However we do not assign "overhead" items a number as these are generally Monthly or annual receipts that are just stored in an overhead folder. However i want to record both Overheads and expenses on the same sheet.

    So, what i want to achieve is for the receipt number column to automatically generate either a receipt number (which is +1 to the previous receipt number) or enter the value"Overhead folder" Ive got as far as =IF(D2="Overhead","Overhead Folder",IF(D2=Expense,SOME SORT OF COUNT FUNCTION,""))

    My logic tells me i need a function to count the number (not test for the SUM of the cells) of cells in the receipt number column which contains a number value only and return a value to the cell with +1 sort of like an auto-number feature but as im fairly new to the advanced stuff in excel im not sure how to express it.

    ReceiptNoForumHelp.xlsx
    You might of guessed, i want it to return as blank if neither are true.

    Any help greatly appreciated.
    Attached Files Attached Files
    Last edited by alfgrey; 09-05-2013 at 08:20 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: IF array with COUNTIF??????

    Try in C2 and copy down.

    =IF(D2="","",IF(D2="Expense",MAX($C$1:C1)+1,"Overhead Folder"))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    09-04-2013
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    117

    Re: IF array with COUNTIF??????

    Works a treat you absolute legend! I cant beleive how powerful excel CAN be if you know how
    Reputation added!

    Thanks again

    Quote Originally Posted by Fotis1991 View Post
    Try in C2 and copy down.

    =IF(D2="","",IF(D2="Expense",MAX($C$1:C1)+1,"Overhead Folder"))

  4. #4
    Forum Contributor
    Join Date
    09-04-2013
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    117

    Re: IF array with COUNTIF??????

    Works a treat you absolute legend! I cant beleive how powerful excel CAN be if you know how
    Reputation added!

    Thanks again

    Quote Originally Posted by Fotis1991 View Post
    Try in C2 and copy down.

    =IF(D2="","",IF(D2="Expense",MAX($C$1:C1)+1,"Overhead Folder"))

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: IF array with COUNTIF??????

    You are welcome and thanks for the feed back.

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thank you.

+ 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. [SOLVED] Countif in an array
    By Petijandro in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-29-2013, 07:48 AM
  2. countif substring from array
    By 2518GA in forum Excel General
    Replies: 2
    Last Post: 09-01-2010, 06:10 AM
  3. Array Countif
    By H43825 in forum Excel General
    Replies: 1
    Last Post: 05-01-2009, 12:04 PM
  4. How do I use countif an array for >=45<=50
    By البيانات in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-04-2006, 04:25 PM
  5. sumproduct , array or countif?
    By cjjoo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-10-2005, 11:36 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