+ Reply to Thread
Results 1 to 11 of 11

Cell Autofilling Issue

  1. #1
    Registered User
    Join Date
    11-10-2012
    Location
    Boston
    MS-Off Ver
    Excel 2011
    Posts
    7

    Cell Autofilling Issue

    Hey guys,

    I'm not sure if this qualifies as a basic Excel question or not, but I'm having an incredible hard time getting the autofill to follow the pattern that I set for it.

    In the first three cells of the series I have the following:

    =IF((COUNTIF(F3:F12,"Hello!"))>=1,"Hello!","Not Hello!")
    =IF((COUNTIF(F13:F22,"Hello!"))>=1,"Hello!","Not Hello!")
    =IF((COUNTIF(F23:F32,"Hello!"))>=1,"Hello!","Not Hello!")

    As scene here, incrementing the cell range by ten every time is my goal. Yet when I select the series and drag to fill down the row my desired length, instead of catching the pattern, it instead increments the next cells in the series by 1 instead of 10, like follows:

    =IF((COUNTIF(F24:F33,"Hello!"))>=1,"Hello!","Not Hello!")
    =IF((COUNTIF(F25:F34,"Hello!"))>=1,"Hello!","Not Hello!")
    =IF((COUNTIF(F26:F35,"Hello!"))>=1,"Hello!","Not Hello!")

    Can someone please tell me what I'm doing wrong and if there is something else I need to do in order to get the autofill to follow my pattern and increment by 10 instead of 1.

    Thank you and all the best,

    ExcelRogue

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

    Re: Cell Autofilling Issue

    hi excelrogue, welcome to the forum. try this at your 1st cell where this formula was:
    =IF((COUNTIF(INDIRECT("F"&3+((ROWS($F$1:F1)-1)*10)&":F"&12+((ROWS($F$1:F1)-1)*10)),"Hello!"))>=1,"Hello!","Not Hello!")

    you can then drag it down

    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
    11-10-2012
    Location
    Boston
    MS-Off Ver
    Excel 2011
    Posts
    7

    Re: Cell Autofilling Issue

    Benshiryo,

    I tried what you said, but now I get this error saying that I'm pointing to an empty cell. I pressed the trace precedents button, and it reveals that I am indeed pointing to an empty cell. Could this be because I didn't start at row 1? I started from row 3.

    excelrogue
    Last edited by jeffreybrown; 11-10-2012 at 08:59 AM. Reason: As per Forum Rule #12, don't quote whole posts unless necessary-- it's just clutter

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Cell Autofilling Issue

    =IF(COUNTIF(OFFSET($F$3,ROWS($A$1:A1)*10-10,,10),"hello!"),"hello!","not hello!")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    11-10-2012
    Location
    Boston
    MS-Off Ver
    Excel 2011
    Posts
    7

    Re: Cell Autofilling Issue

    I'm a bit confused with what you wrote here Martin. Did you leave a piece of the code out?


    Quote Originally Posted by martindwilson View Post
    =IF(COUNTIF(OFFSET($F$3,ROWS($A$1:A1)*10-10,,10),"hello!"),"hello!","not hello!")

  6. #6
    Registered User
    Join Date
    11-10-2012
    Location
    Boston
    MS-Off Ver
    Excel 2011
    Posts
    7

    Re: Cell Autofilling Issue

    Benshiryo,

    Attached is some example code. As you can see in mine, if you click the trace precedent button, mine points to a range of cells. Your solution points to C1, an empty cell. Any ideas?



    Quote Originally Posted by excelrogue View Post
    Benshiryo,

    I tried what you said, but now I get this error saying that I'm pointing to an empty cell. I pressed the trace precedents button, and it reveals that I am indeed pointing to an empty cell. Could this be because I didn't start at row 1? I started from row 3.

    excelrogue
    Attached Files Attached Files

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

    Re: Cell Autofilling Issue

    your previous formula was looking at column F. now in your eg, i suppose you want to look at column C & count if there is 1 or more "Hello!". so try:
    =IF((COUNTIF(INDIRECT("C"&3+((ROWS($D$1:D1)-1)*10)&":C"&12+((ROWS($D$1:D1)-1)*10)),"Hello!"))>=1,"Hello!","Not Hello!")

    this is equivalent of putting:
    =IF((COUNTIF(C3:C12,"Hello!"))>=1,"Hello!","Not Hello!")

    but when dragged down, it increases the range by 10 rows. so it'll be:
    =IF((COUNTIF(C13:C22,"Hello!"))>=1,"Hello!","Not Hello!")
    Attached Files Attached Files
    Last edited by benishiryo; 11-10-2012 at 11:12 AM. Reason: added file

  8. #8
    Registered User
    Join Date
    11-10-2012
    Location
    Boston
    MS-Off Ver
    Excel 2011
    Posts
    7

    Re: Cell Autofilling Issue

    Hmm. Tried that but still seem to be getting the formula refers to empty cell error. Literally that formula you wrote points to D1, which as you can see in the excel document, is empty. Any ideas?


    Quote Originally Posted by benishiryo View Post
    your previous formula was looking at column F. now in your eg, i suppose you want to look at column C & count if there is 1 or more "Hello!". so try:
    =IF((COUNTIF(INDIRECT("C"&3+((ROWS($D$1:D1)-1)*10)&":C"&12+((ROWS($D$1:D1)-1)*10)),"Hello!"))>=1,"Hello!","Not Hello!")

    this is equivalent of putting:
    =IF((COUNTIF(C3:C12,"Hello!"))>=1,"Hello!","Not Hello!")

    but when dragged down, it increases the range by 10 rows. so it'll be:
    =IF((COUNTIF(C13:C22,"Hello!"))>=1,"Hello!","Not Hello!")

  9. #9
    Registered User
    Join Date
    11-10-2012
    Location
    Boston
    MS-Off Ver
    Excel 2011
    Posts
    7

    Re: Cell Autofilling Issue

    It worked. Thanks benshiryo. I dont know why the auto fill was giving me so much trouble, but it works now. Really, thanks! I appeciate it.
    Last edited by excelrogue; 11-10-2012 at 02:23 PM.

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Cell Autofilling Issue

    why did you think i left a bit out?
    =IF(COUNTIF(OFFSET($F$3,ROWS($A$1:A1)*10-10,,10),"hello!"),"hello!","not hello!")
    countif does not need >=1 if it counts any at all then its true (0= false >0=true)
    eg = if(countif(a1:a10,"x"),"yes","none")
    and the formula works fine

  11. #11
    Registered User
    Join Date
    11-10-2012
    Location
    Boston
    MS-Off Ver
    Excel 2011
    Posts
    7

    Re: Cell Autofilling Issue

    My apologies. Thank you for taking the time.

+ 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