+ Reply to Thread
Results 1 to 11 of 11

index/lookup values based on one condition while skipping blanks and zeros.

  1. #1
    Forum Contributor
    Join Date
    11-25-2018
    Location
    Philippines
    MS-Off Ver
    Ms Office 365
    Posts
    217

    index/lookup values based on one condition while skipping blanks and zeros.

    If cell B1 on this sheet will be changed based on values from consolidated sheet column B, the data of that row in which B1 on this sheet is equal to column B of consolidated sheet should automatically calculated and reflected on this sheet cell A3:C10 while skipping blanks and zeros of due to BIR.
    Attached Files Attached Files

  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 2403
    Posts
    44,056

    Re: index/lookup values based on one condition while skipping blanks and zeros.

    This is a really bad layout and will make your life miserable!! It would be much easier if you used only one column of due to BIR (instead of 2) and used ONLY one block of data (columns B to H - assuming that old column G is deleted). If you do not do this, it will be a nightmare.
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

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

    Re: index/lookup values based on one condition while skipping blanks and zeros.

    This sort of layout would be MUCH better!!
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: index/lookup values based on one condition while skipping blanks and zeros.

    I must echo what Glenn has said. I was half way through a complicated array solution but then realised your data is not consistent

    For instance the C10 result is found in AV5 the first of the "Due to BIR" pair of cells whereas the C9 result is in AP5 the second of the BIR pairs.



    You are making the same mistake that I see time and time again. You are mixing up the two elements of data capture and final reporting. The two require quite different treatments.

    A lot of people start by designing the form that they expect to see as the final report or which at first glance seems the best way of capturing data, and then wonder why it's so difficult to subsequently analyse and summarise or extract information from it. Yours exhibits all those features.


    You should always capture data in a simple two dimensional table and worry about reporting information from it afterwards. Without exception doing this you will always be able to easily obtain management information. Rarely is this the case if you start the other way round.
    You will also throw open the whole wonderful world of the powerful Pivot table functionality.

    So before you get too far with this I'd create a single sheet database to capture your data
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: index/lookup values based on one condition while skipping blanks and zeros.

    To Glenn's and Richard's posts, I add one more thing: Put the information in an Excel Table. Excel tables "know" how big they are so as you add or delete data from the table, it knows how many rows it has so formulas, pivot tables and charts that use the table as their source do NOT have to be changed as the data range changes. They will always access the exact number of rows needed.

    The outline provided by Glenn is "normalized" data. Normalized data can be used by pivot tables readily to report the data in just about any format you can imagine.

    Here is a wiki on tables to get you started: http://www.utteraccess.com/wiki/Category:Excel_Articles.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  6. #6
    Forum Contributor
    Join Date
    11-25-2018
    Location
    Philippines
    MS-Off Ver
    Ms Office 365
    Posts
    217
    Quote Originally Posted by Glenn Kennedy View Post
    This is a really bad layout and will make your life miserable!! It would be much easier if you used only one column of due to BIR (instead of 2) and used ONLY one block of data (columns B to H - assuming that old column G is deleted). If you do not do this, it will be a nightmare.
    so sorry but it has to be like that as the actual sheet looks like that. There were columns that were deleted on that sheet to reduce the size of the sheet and is linked to other sheets with formulae. Anyway, i like how you changed the table into that but I cannot delete the other column of due to BIR because it has to be reported individually.
    Later I wilo try to reconstruct this spreadsheet the way you presented. Thank you.
    Last edited by archvanarl; 12-28-2018 at 02:26 AM.

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: index/lookup values based on one condition while skipping blanks and zeros.

    This sounds more like an issue of diplomacy than technical. Sometimes push-back is required.

    There is a very good chance that the data already exists in the format recommended by Glenn, and that someone has taken the time to run a report against this data to put it in a more "human readable" format. This means that a program has to be written to convert it back into its original format. I wind up doing this about half the time. The other half of the time I can convince my data supplier to give me the data in a more usable format.

    I suggest you send the workbook provided by Glenn to whoever is sending you this data and ask if they could provide the data in this format. Most report writers have the ability to dump data in this format into a CSV file.

    The other possibility is that they are entering this data manually. If so, it appears to be a very error-prone process. In this case, it would be wise to give them an Excel form "front end" that saves the data in normalized format. If anybody really needs to see the information strung out horizontally as in the example, they can run a pivot table against it.

    If they are doing manual data entry then the application would probably be better off in a database rather than a spreadsheet, but selling such a system to management is tough.

    Good luck to you.

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: index/lookup values based on one condition while skipping blanks and zeros.

    Sound words and good advice from dflak.

  9. #9
    Forum Contributor
    Join Date
    11-25-2018
    Location
    Philippines
    MS-Off Ver
    Ms Office 365
    Posts
    217

    Re: index/lookup values based on one condition while skipping blanks and zeros.

    Hi,
    I have changed the excel table nearly identical to the sample sheet presentation/construction. I know I may be asking for an impossible and a complicated one, but I still hope that I can come up with the desired results from you guys.

    Thank you and happy new year!
    Attached Files Attached Files
    Last edited by archvanarl; 12-31-2018 at 02:19 PM.

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: index/lookup values based on one condition while skipping blanks and zeros.

    Yes if it's possible it would be extremely complicated. For starters there are just too many merged cells. As has been suggested you should address the source provider and ask for a csv file. Don't accept no for an answer. WHy should yo be expectd to operate inefficiently when a change at source can save a lot of time and effort down the line.

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

    Re: index/lookup values based on one condition while skipping blanks and zeros.

    I don't know how to get to your desired result. There are two BIG problems. The merged cell in column J and the show-stopping problem is the fact that there are STILL two target columns for "Due to BIR". Keeping them in separate rows, but together (the column P value for company X followed by the column Q value for company X) adds another level of complexity that I don't intend to tackle.

    You have two choices. This, which gives you all the column P values and then all the column Q values, or a simpler formula (a little less than half the length) to give you the TOTAL of column P and Q per company. So, laneco would give one number - 149.17.

    As you can see the formula is TRULY horrible. Thi sreturns the company name:

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


    Best solution is the INSIST on getting a flat CSV output and start with it.

    Incidentally, a USEFUL sample sheet does not contain THOUSANDS of rows. I have set the formula only for as far as row 104. It is already a little slow. I have no idea how many rows you have.... but it may get very slow....
    Attached Files Attached Files

+ 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: 4
    Last Post: 10-25-2016, 01:59 PM
  2. Replies: 3
    Last Post: 05-03-2016, 08:16 AM
  3. Index/Match ignoring Blanks/Zeros for each instance
    By corhrtz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-18-2015, 11:04 AM
  4. Replies: 7
    Last Post: 05-28-2014, 01:20 AM
  5. Replies: 2
    Last Post: 03-25-2014, 05:37 PM
  6. How to return list from values skipping blanks
    By ARayburn in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-23-2013, 04:35 PM
  7. lookup based on one criteria & skipping blanks
    By tnfire in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-17-2009, 07:02 PM

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