+ Reply to Thread
Results 1 to 7 of 7

Autofill with If Formula

  1. #1
    Forum Contributor
    Join Date
    02-20-2022
    Location
    Indonesia
    MS-Off Ver
    Excel 2016
    Posts
    118

    Cool Autofill with If Formula

    Hi guys,

    Do you have any solution to this,

    Asal Benih Grade BC Ket
    MPS FARM 1 FARM 1


    i want to autofill "asal benih" from the cell "ket".

    I already attach a semple

    Thanks,,
    Attached Files Attached Files
    Last edited by Sultan1994; 01-05-2023 at 03:46 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Autofill with If Formula

    Not at all clear!! I have NO IDEA where your results are meant to appear!!

    As a starter:

    =IFERROR(INDEX($J$3:$J$6,AGGREGATE(15,6,ROW($J$3:$J$6)-ROW($J$3)+1/($K$3:$K$6=$D$3),ROWS(G$3:G3))),"")

    WHY should Farm 2 appear TWICE in your expected answer for MIX.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Contributor
    Join Date
    02-20-2022
    Location
    Indonesia
    MS-Off Ver
    Excel 2016
    Posts
    118

    Re: Autofill with If Formula

    Quote Originally Posted by Glenn Kennedy View Post
    Not at all clear!! I have NO IDEA where your results are meant to appear!!

    As a starter:

    =IFERROR(INDEX($J$3:$J$6,AGGREGATE(15,6,ROW($J$3:$J$6)-ROW($J$3)+1/($K$3:$K$6=$D$3),ROWS(G$3:G3))),"")

    WHY should Farm 2 appear TWICE in your expected answer for MIX.
    Sorry for my bad explanation,

    Here, I enter the text in G3, G4, G5 and on. when there is just FARM 1 on that cell from G3 to G12 so the cell D3 should automatically write MPS FARM 1, if just FARM 2 it should be MPS FARM 2 and if there is FARM 1 and FARM 2 the text in the D3 shoul automatically write MIX MPS FARM 1 & FARM 2.
    Thanks,,

  4. #4
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,279

    Re: Autofill with If Formula

    Change both with FARM 1 FARM 2 in J5
    "D3"
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  5. #5
    Forum Contributor
    Join Date
    02-20-2022
    Location
    Indonesia
    MS-Off Ver
    Excel 2016
    Posts
    118

    Re: Autofill with If Formula

    Quote Originally Posted by avk View Post
    Change both with FARM 1 FARM 2 in J5
    "D3"
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    but in other case, what if I dont have any table to used as a source of INDEX & MATCH. There is a way the formula work too?
    And in this case, I just want to fill the cell in D3, based on text on G3:G12!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Autofill with If Formula

    Try this:

    =IF(G3="","",IF(AND(COUNTIF(G3:G12,"Farm 1")>0,COUNTIF(G3:G12,"Farm 2")>0),$K$5,IF(COUNTIF(G3:G12,"Farm 1")>0,$K$3,$K$4)))

    copy/paste into the other cells.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-20-2022
    Location
    Indonesia
    MS-Off Ver
    Excel 2016
    Posts
    118

    Re: Autofill with If Formula

    Quote Originally Posted by glenn kennedy View Post
    try this:

    =if(g3="","",if(and(countif(g3:g12,"farm 1")>0,countif(g3:g12,"farm 2")>0),$k$5,if(countif(g3:g12,"farm 1")>0,$k$3,$k$4)))

    copy/paste into the other cells.
    thanks a lot glenn, you're the best!

+ 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] How to include prefix for Series Autofill and automatically autofill next blank row?
    By soojungchoe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2021, 07:49 PM
  2. formula in cell - autofill vba vs. putting formula in vba itself
    By bsquad in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-22-2016, 04:25 PM
  3. Autofill base on Active Cell and Autofill by row count of another sheet
    By enyak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2014, 10:06 PM
  4. Replies: 0
    Last Post: 09-17-2012, 08:24 AM
  5. Macro for Autofill removes header info when there is no data to autofill
    By esturan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-06-2012, 01:42 PM
  6. Replies: 1
    Last Post: 06-17-2005, 04:05 PM
  7. Replies: 0
    Last Post: 03-02-2005, 12:06 PM

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