+ Reply to Thread
Results 1 to 25 of 25

Help: Multiple criteria involving strings

  1. #1
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Question Help: Multiple criteria involving strings

    1. The first worksheet contains a database.

    2. The column headers can be seen in attached file.

    3. Budget-Spent-Forecast attribute can be
    1. Committed
    2. Forecast

    4.CW attribute is year followed by week number
    example:
    2014-35
    2015-06
    2015-08

    5. Year attribute lists the year


    6.Here is my problem. I want to figure out a way (function or a macro), that will run through the database and find the latest entry for the attribute ' committed'
    ie.
    committed - latest year

    Then it proceeds to extract the week number. Then it exports the week number as 'CWweeknumber' to a cell in a different worksheet in the same file.

    Any help would be grateful! Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Help: Multiple criteria involving strings

    Provide a small database to work upon...

    Vikas Gautam

  3. #3
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    here is a small example of data


    CWexcelmacro.xlsx

  4. #4
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: Help: Multiple criteria involving strings

    Got the solution...
    Try this..
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    check the attachment..
    Attached Files Attached Files
    Last edited by JBeaucaire; 08-29-2014 at 12:02 PM.

  5. #5
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    Doesn't help since, new entries would be made to the database and the formula contains fixed cell references. I also made a mistake in the database. the CW colum is not filled as week number but as 2014-01 or 2015-06 or 2015-43
    Last edited by oasafox; 08-28-2014 at 04:21 AM.

  6. #6
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    Doesn't help since, new entries would be made to the database and the formula contains fixed cell references. I also made a mistake in the database. the CW colum is not filled as week number but as 2014-01 or 2015-06 or 2015-43. Some clarification, small explanation on why MMULT function works here would be great!


    Quote Originally Posted by Vikas_Gautam View Post
    Got the solution...
    Try this..
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    check the attachment..

    Don't forget to click *

    http://www.Excel-Buzz.blogspot.in

  7. #7
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Help: Multiple criteria involving strings

    I used Mmult() to avoid pressing Ctrl + shift + enter..

    Vikas Gautam

  8. #8
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    But the formula doesnt work when i put it in my original databse
    shows #value errror,
    I changed the column references to appropriate columns.
    What do you mean by avoid pressing control shift Enter? That is an illogical explanation. MMULT is array multiplication function.
    Anyway it is wrong, because it give 0 output when that is not the latest entry.

    Quote Originally Posted by Vikas_Gautam View Post
    I used Mmult() to avoid pressing Ctrl + shift + enter..

    Vikas Gautam
    Last edited by oasafox; 08-28-2014 at 05:28 AM.

  9. #9
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Help: Multiple criteria involving strings

    I have given two formulas for latest entry..
    and those two were working for me..
    as you didn't explain the measure of latest entry...

    May be there can be problem with your excel version..
    try replacing "," with ";"

    Vikas Gautam

  10. #10
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    That formula works on in the test file. in datvbase file file it doesn't, it gives 'value error, I made the , > , change already. even i am wondering why it works in one file and doesnt in another. it is xlsm file.


    Quote Originally Posted by Vikas_Gautam View Post
    I have given two formulas for latest entry..
    and those two were working for me..
    as you didn't explain the measure of latest entry...

    May be there can be problem with your excel version..
    try replacing "," with ";"

    Vikas Gautam

  11. #11
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    =RIGHT(INDEX(Basis!$U$4:$U$90000;MAX(IF(LEFT(Basis!$U$4:$U$90000;4)*1=MAX(LEFT(Basis!$U$4:$U$90000)*1);IF(Basis!$I$4:$I$90000="committed";ROW(Basis!$U$4:$U$90000)-ROW(Basis!$U$4)+1))));2)

    I edited the formula to this to fit it to my database, but now I get #value error

  12. #12
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    I get an error message when I control shift enter. I usuallg get an error from this sheet alread whenever I press enter. so i dont think I can enter it way you want me to. one user above mentioned mmult function for doing this. what is that about?

  13. #13
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Help: Multiple criteria involving strings

    Provide your database file...
    the big one..
    if you can...

    Don't forget to click *

  14. #14
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    Unfortunately confidential.

  15. #15
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Help: Multiple criteria involving strings

    Try this formula.....
    Please Login or Register  to view this content.
    Don't forget to enter it with Ctrl+Shift+Enter.

    Does this help?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  16. #16
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Help: Multiple criteria involving strings

    Okay then..
    So try Mr. Sktneer's formula..
    Hopefully that will..do..

    Vikas Gautam

  17. #17
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    I have an error in the file already called 'ambiguous name detected' it always appears when I change some cell. Does that help?

    #value!

    Quote Originally Posted by sktneer View Post
    Try this formula.....
    Please Login or Register  to view this content.
    Don't forget to enter it with Ctrl+Shift+Enter.

    Does this help?

  18. #18
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Help: Multiple criteria involving strings

    Did you change the range reference as per your actual workbook and comma to semi-colon?

  19. #19
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    {=RIGHT(INDEX(Basis!$G$78:$G$90000;MAX(IF(IF(Basis!$G$78:$G$90000<>"";LEFT(Basis!$G$78:$G$90000;78)*1)=MAX(IF(Basis!$G$78:$G$90000<>"";LEFT(Basis!$G$78:$G$90000;78)*1));IF(Basis!$I$78:$I$90000="committed";ROW(Basis!$G$78:$G$90000)-ROW(Basis!$G$78)+1))));2)}


    This is what I have in the cell

  20. #20
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Help: Multiple criteria involving strings

    Please upload a sample workbook exactly similar to your original workbook with enough sample data in it along with the formula used.

  21. #21
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Help: Multiple criteria involving strings

    I just noticed that in the LEFT formula you are using 78. Why? I was using 4 to extract the year as in your sample data the first 4 characters of the strings in the cells are year.

  22. #22
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    some of the data in the table is pulled up from other worksheets. but is think that is not relevant here

    exactfile.xlsx

  23. #23
    Registered User
    Join Date
    08-11-2014
    Location
    COlogne, Germany
    MS-Off Ver
    2010, 2013
    Posts
    29

    Re: Help: Multiple criteria involving strings

    yeah corrected that, still the same error

    Quote Originally Posted by sktneer View Post
    I just noticed that in the LEFT formula you are using 78. Why? I was using 4 to extract the year as in your sample data the first 4 characters of the strings in the cells are year.

  24. #24
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Help: Multiple criteria involving strings

    For the data you have in the file, the following Array Formula will give you the desired output.

    Please Login or Register  to view this content.

  25. #25
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Help: Multiple criteria involving strings

    Moreover if your data in col. G is not in sequence (as opposed to the data in your sample file where previous years are listed first), then the following formula will give you the desired result.
    Please Login or Register  to view this content.

+ 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] Complex IF function involving matching multiple criteria
    By adray13 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-25-2013, 03:05 PM
  2. Replies: 1
    Last Post: 12-20-2012, 04:18 PM
  3. Replies: 0
    Last Post: 09-29-2012, 12:27 AM
  4. Replies: 0
    Last Post: 04-18-2012, 06:51 AM
  5. [SOLVED] Counting multiple criteria involving dates
    By S Davis in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-10-2006, 06:35 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