View Single Post
 
Old 02-05-2019, 07:34 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

In case the list of companies is not too long, the solution in attached workbook may be an option.

The named ranges nName## are less prone to errors, when search strings are not very short (this is the cause I limited the search for of string "WM" to 5 leftmost characters of description). The worst error is, when several names nName## are returning non-zero responses - those will be summarized, and as the result a wrong company may be returned.

Theoretically you can search for 254 different companies typed-in directly into formula. To have more companies, you must have a sheet with list of companies, and the CHOOSE() function must refer to this list instead typed-in one.

You can use autofilter to filter any set of entries from data table.

When you add a couple of empty rows at top of table (in case the data table is defined as a Table, it is good idea to keep an empty row between entries not in Table and Table), then into field C1 you can enter the formula like
Code:
=SUBTOTAL(9,tData[Amount])
Now whenever you set any autofilter for your data table, the total amount for filtered rows is returned by the formula.
Attached Files
File Type: xlsx StringSearch.xlsx (12.7 KB, 19 views)
Reply With Quote