+ Reply to Thread
Results 1 to 4 of 4

Calculating whether a person has upgraded between lists

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    2

    Calculating whether a person has upgraded between lists

    Hello,

    I am trying to write a formula that isn't a gigantic IF statement to calculate whether a person has upgraded their type of house or not within a time period.

    The below are the names of the types of housing. I have two of these lists, the first is from the beginning of the time period and the second is from the end of the time period:

    Pucca - Normal
    Kuchha - Strong
    Pucca - IAY
    Kuchha - Medium
    Kuchha - Weak

    The best option on this list is Pucca - Normal and the worst is Kuchha - Weak.

    A person can start at any option on this list and end on any option. I only want to measure whether their type of house has been upgraded (i.e. from Kuchha - Weak to Kuchha - Medium). I do not need to calculate whether they have stayed the same or been downgraded.

    If the person has upgraded I want to display the value of 1. If they have stayed the same or downgraded I do not want to display anything.

    An added complication is that if they have upgraded to Pucca - IAY I want to also do not want to show anything.

    I know this might sound a little weird but can anyone help?

    Thanks

    Steve

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Calculating whether a person has upgraded between lists

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


    StartType and EndType should be self explanatory, ListofTypes is a range of cells containing your list exactly as posted above.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Calculating whether a person has upgraded between lists

    Thanks very much Olly. That has worked except for one thing.

    I need to be able to show a value of 0 if they have upgraded to Pucca - IAY.

    I have tried to do this by creating two lists 1. without Pucca - IAY and 2. with Pucca - IAY at the end. I have given these different names so that the user selects from the list including Pucca - IAY but the calculation uses the list that excluded Pucca - IAY. The issue is that when someone does upgrade to Pucca - IAY I get an #N/A error.

    This is the formula so far, it is basically a carbon copy of yours =IF(MATCH('Base line survey - completion'!C21,House,0)<MATCH('Base line survey - initial'!C21,House,0),1,0)

    Do you know how I can get rid of this #N/A error?

    Thanks

    Steve

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Calculating whether a person has upgraded between lists

    There are a couple of ways you could handle it - I would tend towards just maintaining one list, and checking for Puuca-IAY first - so formula would become:
    Formula: copy to clipboard
    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. Finding all occurances of person's name and calculating hours worked
    By me5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2014, 05:57 AM
  2. Calculating How Much Each Person Brings in a Month
    By Big D in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-17-2013, 11:34 AM
  3. Calculating Total Time over Several Tabs per Person and Task
    By jshimko in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-27-2013, 02:12 AM
  4. Calculating a person's age
    By rmf in forum Excel General
    Replies: 4
    Last Post: 10-11-2011, 02:24 PM
  5. [SOLVED] Calculating Age of person on admission date
    By Alan in forum Excel General
    Replies: 10
    Last Post: 10-08-2005, 02: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