[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
Solved

# Change in Excel sum required

Posted on 2011-10-13
Medium Priority
286 Views
In the attached spreadsheet is a worksheet named 'Analyse' and in here is some sums.  I need to build into the sum a filter so that I can get more specific results.

In the worksheet named 'Master Sheet' column 'G' are some product codes and I would like to build into the sum the ability to be able to filter results by the start of a product code so that I can see specific results filtered by code.  I don;t want it to search by the whole code though so as an example I have two codes PJ5055DYEC & PJ5055DYEB, rather than the whole code I want to filter by PJ5055DYE as then I get the results for every code starting with these digits.

Any help greatly appreciated.
0
Question by:Simonrepro

LVL 50

Accepted Solution

barry houdini earned 2000 total points
ID: 36960917
Hello Simonrepro,

if you put the code (e.g. PJ5055DYE) in A1 on Analyse sheet then you can change B2 to this formula copied across and down

=SUMPRODUCT(--('Master Sheet'!\$J\$2:\$J\$385=\$A2),--(TEXT('Master Sheet'!\$F\$2:\$F\$385,"mmm-yy")=TEXT(B\$1,"mmm-yy")),--(LEFT('Master Sheet'!\$G\$2:\$G\$385,LEN(\$A\$1))=\$A\$1),'Master Sheet'!\$H\$2:\$H\$385)

see attached

regards, barry
27394381.xls
0

Author Closing Comment

ID: 36960926
Perfect
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.