+ Reply to Thread
Results 1 to 21 of 21

Summarizing information SUF IF and VLOOKUP

  1. #1
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Unhappy Summarizing information SUF IF and VLOOKUP

    Hi Experts,
    I have attached here my actual work sheet which I used to do some "summations" of information and VALUES.

    Just today, I saw that the "total qty" in the 'Data Sheet' doesn't match to the 'Summary Sheet.
    When I did some re checking manually, I found that the information highlighted in RED has not been summarized/added.
    I have checked formulas, but, I don't find any errors.

    If someone can help, it is great.

    Regards
    Anuruddha
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Summarizing information SUF IF and VLOOKUP

    The formula name range Booking_Ref
    =OFFSET('Data Sheet'!$D$2,,,COUNTIF('Data Sheet'!$D$2:$D$1055,"*?"),1)

    "*?" is only count Text
    it misses 4 count for these number
    21770
    21760
    21760
    21166

    Please change to
    =OFFSET('Data Sheet'!$D$2,,,COUNTA('Data Sheet'!$D$2:$D$1055))
    or
    =OFFSET('Data Sheet'!$D$2,,,SUM(COUNTIF('Data Sheet'!$D$2:$D$1055,{"*?",">0"})))
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Summarizing information SUF IF and VLOOKUP

    The formulas defining your named ranges are not returing the correct result because you have used the wrong functions for the task.

    COUNTIF(Range,"*") will not count any cells that only contain numbers, even if they are formatted as text.

    If you use the structured tables properly, you will not need named ranges anyway.

    On the data sheet, select all of the coloured rows below the red, right click and delete entire row. (You don't need to pre-fill formulas in a structured table, when you add new data to the bottom, it is done automatically).

    Next, go to the summary sheet. Press Ctrl & h to bring up the find and replace box.
    In the Find What: box, enter Booking_Ref
    In the Replace With: box, enter Table2[Booking Ref.]
    Make sure that there are no spaces in either box, before or after the text, thn click the Replace All button.

    Wait about 15 seconds for it to recalculate and your results should now be correct.
    Go to the name manager and delete the named range, Booking_Ref

    I would suggest applying a similar fix to the other named ranges to avoid any more potential problems.

    I would suggest also deleting the majority of the unused prefilled rows in the summary table, then just more as you need them. It will speed up processing time.

    edit:- Attachment removed, updated version in post #11
    Last edited by jason.b75; 04-03-2019 at 12:51 PM.

  4. #4
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Re: Summarizing information SUF IF and VLOOKUP

    I did as you explained. However, when I searched named range manger, I didn't find clear named ranges!!. Inside named range manager, there are few named ranges which I am not clear about. Can you pls correct the attached work sheet and send me?

  5. #5
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Re: Summarizing information SUF IF and VLOOKUP

    Quote Originally Posted by Bo_Ry View Post
    The formula name range Booking_Ref
    =OFFSET('Data Sheet'!$D$2,,,COUNTIF('Data Sheet'!$D$2:$D$1055,"*?"),1)

    "*?" is only count Text
    it misses 4 count for these number
    21770
    21760
    21760
    21166

    Please change to
    =OFFSET('Data Sheet'!$D$2,,,COUNTA('Data Sheet'!$D$2:$D$1055))
    or
    =OFFSET('Data Sheet'!$D$2,,,SUM(COUNTIF('Data Sheet'!$D$2:$D$1055,{"*?",">0"})))
    I think this is not the case. These values are already there in the summary sheet.

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Summarizing information SUF IF and VLOOKUP

    Please see differences from your sheet on the left and post#2 sheet
    37 and 41 Entry
    Countif( ,"*?) and Counta( )

    Untitled.jpg

  7. #7
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Re: Summarizing information SUF IF and VLOOKUP

    Quote Originally Posted by Bo_Ry View Post
    Please see differences from your sheet on the left and post#2 sheet
    37 and 41 Entry
    Countif( ,"*?) and Counta( )

    Attachment 617651
    Yes. The solution is right. Anyway, the work sheet I attached at the beginning of the post, this below issue was not found;

    *?" is only count Text
    it misses 4 count for these number
    21770
    21760
    21760
    21166

    I found only the RED highlighted booking references!!. I am confused.
    Anyway, thanks a lot for the advise and solution. I will do some more works outs, and let you know.

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Summarizing information SUF IF and VLOOKUP

    Quote Originally Posted by Anuru View Post
    Yes. The solution is right.
    That was just an answer, the solution is in post #3

    Re:- confusion with countif in named range, consider the following in A1:A3

    ABC
    123
    DEF

    =COUNTIF(A1:A3,"*?") will count 2 (A1 and A3)
    When you use that as the height of =OFFSET(D1,0,0,COUNTIF(A1:A3,"*?"),1) you are saying you want 2 rows (the result of countif) which gives you D1:D2, not D1 and D3 as you might think.
    This is what happened in your sheet, because you had 4 numbers that were not counted, OFFSET lost the bottom 4 rows of data.

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Summarizing information SUF IF and VLOOKUP

    =COUNTIF('Data Sheet'!$D$2:$D$1055,"*?") =57
    =OFFSET('Data Sheet'!$D$2,,,57) = D2:D58
    it misses 4 counts for number, but when combine with offset, it miss last 4 rows

    =COUNTA('Data Sheet'!$D$2:$D$1055) =61
    =OFFSET('Data Sheet'!$D$2,,,61) =D2:D62

  10. #10
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Exclamation Re: Summarizing information SUF IF and VLOOKUP

    Hi,
    I faced another problem today due to an strange behavior of the work sheet. Normally, I copy data directly from another work sheet (filtered data using filter options) to this sheet. It was working fine and the copied data (filtered) were pasted on the "Data Sheet" tab as per the column headings, without any issue.

    However, today, when I try to copy and paste data from the same data sheet to this work sheet, then, the copied data don't paste properly. This issue starts from column D and on wards. I din't experience this issue before. Now, the copied data get pasted very irregularly leaving some rows empty and also missing information etc.

    I have added the copied data in a new sheet called "sheet 1, which were the data copied from original sheet (the original master sheet is big in size and cannot be attached here).

    You can try copying data from Sheet 1 to "Data Sheet" in keeping with the column headings on both the sheets to check how the error is re produced. For example, if you copy "Booking reference" from sheet 1 and try to copy it to Data sheet, you can see how the data at the bottom of the data sheet move.

    Pls kindly see the why this issue cropped up suddenly..

  11. #11
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Summarizing information SUF IF and VLOOKUP

    Please see post #3 for the correct way to fix your previous problem. As you completely ignored it in favour of a less favourable suggestion, I am loathe to waste my time providing you with additional assistance, however, given that the file attached to my post has never been downloaded, I'm going to assume that it was an oversight more than ignorance.

    As with your previous issue, the problem lies with incorrect use of the structured tables in your file (a structured table is when you apply a table from the 'Insert' tab of the excel ribbon, as has been done in your file). When you have this, you should not have any empty rows at the bottom of the table. As you add new data it will automatically resize to cover it.

    Because your table is not the correct size for the data that you are copying into it the structure is falling apart.

    I've re-attached the copy of your file with my previous suggestions for improvement, along with another slight change to the formulas in the summary to further improve calcualtion efficiency.

    If you look at the Data sheet, you will notice that I have deleted all rows except for the first one. If you copy your data and paste into row 2 of the relevant column, you will notice that the table resizes to fit the data.

    It looks like you have to copy and paste a few columns at a time, once the first is done as above and the table is the correct size, you should be able to do the rest without problems.

    If you are going to delete the data from the sheet to re-use it again later, you need to right click and 'Delete Entire Row' or 'Delete Table Rows' (whichever option is given to you ).
    If you select the cells and press the delete key, you will probably run into the same problem again!!

    This whole process could probably be simplified with power query.
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Re: Summarizing information SUF IF and VLOOKUP

    Hi Jason,
    Thanks a lot for your valuable advice and providing a very good total solution to this work sheet.
    I did a little trick to copy data from the master sheet at once without copying column by column. I copied the data from the master sheet to another excel sheet in one go, and removed unwanted data columns and kept only the required columns as required by this work sheet, and did some column changes (cut and paste) in keeping with the column labels of the Data sheet. Then, copied those columns to this data sheet in go, and it worked without any blank rows/missing data etc.

    Actually, I worked out as per your advice in post 3, but was not successful and I thought no to bother you again.
    Now I am using your newly developed sheet. Let me work with it for some time to see whether it gives some other issues. At present no issues have been seen yet.
    Last edited by AliGW; 04-03-2019 at 02:29 PM.

  13. #13
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Summarizing information SUF IF and VLOOKUP

    Quote Originally Posted by Anuru View Post
    Actually, I worked out as per your advice in post 3, but was not successful and I thought no to bother you again.
    It is no bother when you ask for additional guidance if you have problems in doing or understanding something that has been suggested, in fact it is quite the opposite because it shows that you are willing to put in some effort to resolving your problem rather than letting somebody else do it for you.

    When you ask a question and receive multiple answers suggesting different ways to solve your problem, remember that not all answers are solutions!

    An answer does what you need, but may not be the best or most efficient method, it may work now but not later (as you have found here).
    A solution should do what you need efficiently and be robust enough to work without failing at a later stage.

  14. #14
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Re: Summarizing information SUF IF and VLOOKUP

    Quote Originally Posted by jason.b75 View Post
    It is no bother when you ask for additional guidance if you have problems in doing or understanding something that has been suggested, in fact it is quite the opposite because it shows that you are willing to put in some effort to resolving your problem rather than letting somebody else do it for you.

    When you ask a question and receive multiple answers suggesting different ways to solve your problem, remember that not all answers are solutions!

    An answer does what you need, but may not be the best or most efficient method, it may work now but not later (as you have found here).
    A solution should do what you need efficiently and be robust enough to work without failing at a later stage.
    Yes, I understand completely. Due to the busy working environment (working as General Manager Planning for an apparels manufacturer), full of e-mails, calls, meetings, floor visits etc, studying something a bit deeply has become a bit difficult.

  15. #15
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Re: Summarizing information SUF IF and VLOOKUP

    Hi Experts,

    Attention: Jason


    I marked this thread 'solved', but today I experienced another issue.

    The issue is;

    The style swrmg1295 has 9 delivery splits (as shown in "data sheet")

    My requirement is to get the SUM of the quantities based on STYLE NO and also EX FACTORY DATE.

    For example, for style no swrmg1295, the 12th May qty that should appear on 'summary sheet' should be 19992.
    However, the summary sheet shows 119952, which is the total qty of the style, which has spread in different ex factory dates.

    Ideally this should appear on the summary sheet as follows;

    12 May - 19992
    19 May - 19992
    26 May - 19872
    2 Jun - 10008
    23 Jun - 20064 (this has two quantities on the same date), 10032+10032)
    30 Jun - 10008
    7 July - 10032
    21 July -9984

    Pls help to get this solved...
    Last edited by Anuru; 05-07-2019 at 02:19 AM.

  16. #16
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Summarizing information SUF IF and VLOOKUP

    Can we add a formula column to the data sheet?

  17. #17
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Re: Summarizing information SUF IF and VLOOKUP

    Hope a Helper Column, is it? Of course, no issue at all.

  18. #18
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Summarizing information SUF IF and VLOOKUP

    This is best I can do, the dates are in reverse order though.

    I can change it so that they are in the correct order but it will probably double the already slow calculation times.

  19. #19
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Lightbulb Re: Summarizing information SUF IF and VLOOKUP

    This is great, though it takes a little time to process. I checked randomly some figures, and I didn't find any calculation errors.
    The data don't need to be in ascending order because, I am using sorting/slicers to filter these data. Attached work book for your reference (the same data from the above work sheet have been copied without formulas).

  20. #20
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Summarizing information SUF IF and VLOOKUP

    I'll have another look at it for you when I have a bit more free time, see if I can speed it up a bit. Might not be for a week or so though.

  21. #21
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    605

    Re: Summarizing information SUF IF and VLOOKUP

    Great. Thanks.

+ 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: 1
    Last Post: 03-01-2019, 04:07 AM
  2. [SOLVED] issue macro copying not required data for summarizing information
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2019, 05:24 AM
  3. Replies: 2
    Last Post: 09-25-2013, 10:19 AM
  4. Summarizing tabs together - alternative to VLOOKUP/HLOOKUP?
    By patrick40 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-02-2013, 10:24 AM
  5. [SOLVED] parsing and summarizing a column for dates, then summarizing in a parallel column
    By James C in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-29-2013, 10:02 AM
  6. Address Information VLOOKUP
    By alanpw in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-08-2010, 08:31 AM
  7. Summarizing with information from multiple columns
    By rooney09 in forum Excel General
    Replies: 1
    Last Post: 08-23-2010, 05:40 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