+ Reply to Thread
Results 1 to 6 of 6

How to get excel to flash fill by learning changes to formula

  1. #1
    Registered User
    Join Date
    06-22-2015
    Location
    toronto, Ontario
    MS-Off Ver
    2013
    Posts
    2

    How to get excel to flash fill by learning changes to formula

    Here is my formula for the first 3 study's:


    =SUMIF(Study_ID,LEFT(1,1),F:F)
    =SUMIF(Study_ID,LEFT(2,1),F:F)
    =SUMIF(Study_ID,LEFT(3,1),F:F)

    I need to add the values in column F for each study and not for each subset. Each study is represented by the numbers before the period (eg study id 13.3 is study 13), that is why I have the left function. If there is a value of 1 in column F for study ID's 1.1 and 1.3 but not 1.2, I need excel to give me the sum of 2. I need this done for all studies and not each study ID. There are over 300 studies and over 700 study ID's so it would be very painful to do manually. Can I do this using the flash fill function in excel 2013? Thank you very much for your help.
    Last edited by dhingsa; 06-23-2015 at 02:18 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: How to get excel to flash fill by learning changes to formula

    First, you are not using LEFT correctly. The first argument in LEFT is supposed to a string. You have a number, which will be converted to a string. Your third line, for example, means "give me the first character in the string '3'". I don't think that's what you want.

    I don't think Flash Fill is smart enough to do this for you. I think this can be done with an array formula but I am not clear on how your data is organized and where you want the answers to appear. It might help if you attach your actual file.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,427

    Re: How to get excel to flash fill by learning changes to formula

    I presume Study_ID is a named range (set to the full column?). If so, you can do this:

    =SUMPRODUCT(--(INT(Study_ID)=ROWS($1:1)),F:F)

    then copy down. Both arrays, Study_ID and F:F, have to be the same size. However, it is not a good idea to use full-column references with SUMPRODUCT, as it will evaluate every item in the range and will thus be very sluggish if you have a lot of empty rows. So, make Study_ID as large as it needs to be and adjust the F:F term as appropriate.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    06-22-2015
    Location
    toronto, Ontario
    MS-Off Ver
    2013
    Posts
    2

    Re: How to get excel to flash fill by learning changes to formula

    I named the range I will using from Column F to a range that is the same as STUDY_ID and it WORKS. THANK YOU SO MUCH.
    Last edited by dhingsa; 06-22-2015 at 02:09 PM.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,427

    Re: How to get excel to flash fill by learning changes to formula

    Put this formula in cell E2:

    =SUMPRODUCT(--(INT($A$2:$A$37)=D2),$B$2:$B$37)

    then copy down.

    Hope this helps.

    Pete

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: How to get excel to flash fill by learning changes to formula

    Quote Originally Posted by dhingsa View Post
    I named the range I will using from Column F to a range that is the same as STUDY_ID and it WORKS. THANK YOU SO MUCH.

    Last edited by dhingsa; Today at 02:09 PM.
    dhingsa, please do not edit posts after people have responded to them. It looks like you've removed an attachment, and changed your text, so we are unable to see what Pete_UK responded to. It's not a formal rule but helps keep things orderly. Thanks.

+ 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. Replies: 8
    Last Post: 02-12-2020, 02:47 AM
  2. Flash Fill: Amazing New Feature in Excel 2013
    By benishiryo in forum Tips and Tutorials
    Replies: 3
    Last Post: 07-01-2013, 04:19 AM
  3. Learning VBA - Suggestion for Beginners Learning Curve
    By sighlent1 in forum Excel General
    Replies: 1
    Last Post: 08-26-2010, 12:58 PM
  4. [SOLVED] Flash in excel
    By amag in forum Excel General
    Replies: 3
    Last Post: 07-03-2006, 04:10 PM
  5. [SOLVED] excel+flash
    By Ben Lurkin in forum Excel General
    Replies: 0
    Last Post: 09-24-2005, 03:05 AM

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