+ Reply to Thread
Results 1 to 3 of 3

Formula for If the last 5 cells did not contain number 11, insert number 11

  1. #1
    Registered User
    Join Date
    11-05-2014
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    2

    Formula for If the last 5 cells did not contain number 11, insert number 11

    Hi Community,

    I am looking for a formula which can return this for me.

    Cells

    A1 = 12
    A2 = 13
    A3 = 4
    A4 = 16
    A5 = 15


    In Cell B6, I want a formula that if the previous 5 cells in the column to the left did not contain the number 11 in any of the cells, put 11 into Cell B6

    Would appreciate any help please =D

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Formula for If the last 5 cells did not contain number 11, insert number 11

    Hi, welcome to the forum

    Perhaps this?
    =IF(COUNTIF(A1:A5,11)=0,11,"")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-05-2014
    Location
    Australia
    MS-Off Ver
    2007
    Posts
    2

    Re: Formula for If the last 5 cells did not contain number 11, insert number 11

    Hi Fdibbins,

    Thank you for your help! That was exactly what I needed =D

+ 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] insert appropriate number of blank spaces in cells B through H
    By hcorbitt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-20-2014, 02:50 PM
  2. [SOLVED] insert a number in sheet1, add that number of rows in sheet2 and sheet3
    By dishguy05 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-07-2014, 04:55 PM
  3. [SOLVED] Macro To insert Number to a certain cells in same rows?
    By sem in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-02-2012, 07:34 AM
  4. Can you insert a letter/number in multiple cells?
    By ChristensenM in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 10-13-2011, 07:50 AM
  5. Insert Zeros before a number in cells
    By shantisreeni in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2007, 04:49 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