+ Reply to Thread
Results 1 to 10 of 10

Thread: Auto Populate

  1. #1
    Registered User
    Join Date
    02-16-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    5

    Talking Auto Populate

    Hello,

    I'm having some problems wth formula to auto populating column D-G. Based on Columns B and C, I would like to identify which State is activated or inactivated. If it is in both column B and C, I want to document it as "AI" so I can trouble shoot that IT#.

    So far, I used =IF(SEARCH("TX",B2)=1,"A") function and it works if I only applied to only one column but not both.

    IT#,Activat,Inactive,TX,VA,OK,LA
    1,TX, LA, VA, OK,TX,AI,A,A,A
    2,LA TX,TX,AI,null,null,A
    3,OK,VA,null,I,A,null

    Thanks in advance.
    Attached Files Attached Files
    Last edited by chamce; 02-18-2010 at 03:17 PM.

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Auto Populate

    In D2 and copied down:

    =IF(AND(ISNUMBER(SEARCH(D$1, $B2)), D$1=$C2), "AI", "null")

    I don't see instructions to explain the "A" and "I" values in the other columns, but maybe you can take it from there?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-16-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Auto Populate

    Hi JBeaucaire,

    Thank you for your prompt response. I forgot to explain the process. Active and Inactive columns get updated and when I changed the inactive column, the formula you provided didn't worked. I think it is because D$!=$C2 or it may need different formula. I've been trying to manipulate that section but no luck so far. D1-G1 doesn't get changed but column B&C gets changed.

    Thank you.

  4. #4
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Auto Populate

    There was no exclamation point in my formula, and it was only designed so far for column D.

    That's a lot of IFs, but try this in D2 and copy down and across the table:

    =IF(NOT(OR(ISNUMBER(SEARCH(D$1,$B2)),D$1=$C2)), "null", IF(ISNUMBER(SEARCH(D$1,$B2)), "A", "") & IF(D$1=$C2, "I", ""))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    02-16-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Auto Populate

    Thank you for your answer and it works on column D, but I don't think that will not work since I have many other States to work on. What other options is available?

    Thanks bunch!

  6. #6
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Auto Populate

    The formula above should continue to work no matter how many state columns you add. It works for 4 columns (D:G), it would work for 40.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  7. #7
    Registered User
    Join Date
    02-16-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    5

    Thumbs up Re: Auto Populate

    Please see the attached document and change the information around and sometime it works and some times, it doesn't work. Maybe it is me. :-)

    Based on your information, I changed around your formula and now it works!

    =IF(ISNUMBER(SEARCH(D$1,$B2)), "A", "") &" "& IF(ISNUMBER(SEARCH(D$1,$C2)), "I", "")

    You are awesome and thanks bunch!
    Attached Files Attached Files

  8. #8
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Auto Populate

    Your first sample only showed one value INACTIVE at a time, so I used an appropriately simple comparison, but you need the complicated comparison in both active and inactive.

    Put this in D2, then copy down/across:

    =IF(NOT(OR(ISNUMBER(SEARCH(D$1,$B2)), ISNUMBER(SEARCH(D$1,$C2)))), "null", IF(ISNUMBER(SEARCH(D$1,$B2)), "A", "") & IF(ISNUMBER(SEARCH(D$1,$C2)), "I", ""))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  9. #9
    Registered User
    Join Date
    02-16-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Auto Populate

    Thank you and it works great!

  10. #10
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Auto Populate

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated. It is found across from the "time" in each of our posts.)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0