0

SORT SUM, what am i doing Wrong

Hi!

I think you might be having a cell referencing problem in your sort by sum formula. You are referencing $F46 for Posting Group. In a normal formula, this cell reference will automatically update as the row is copied down. However, the sort by sum formula is just a string to Excel, and the cell reference won't be updated while it is inside a string. So you need to change your sort by sum formula to put this cell reference outside the string like this:

=NL("rows";"Sales Invoice Line";;"Sell-to Customer No.";$H$7;"Document No.";"<>FVB*&<>COR*";"Type";"Item";"Amount";"<>0";"Quantity";"<>0";"Posting Group";$F46;"-=NL(""Sum"";""Sales Invoice Line"";""Amount"";""Type"";""Item"";""Sell-to Customer No."";$H$7;""Document No."";""<>FVB*&<>COR*"";""Amount"";""<>0"";""Quantity"";""<>0"";""Posting Group"";"""&$F46&""";""No."";NF(;""No.""))";"*")
You could do the same thing with $H$7 although I don't think you need to since it is an absolute cell reference and won't change anyway. Does this help?

Regards,
Hughes

2 comments

Please sign in to leave a comment.