简体   繁体   中英

Create list from data range

I was hoping to get a bit of help regarding formulas in Excel/VBA, I'm looking to do the following but I'm not sure how best to do it:

Okay, so I have a materials export from a piece of software and it comes out with the following sort of data:

In essence I would like to have a catalogue stored on a separate sheet which the function references for text strings that may be contained in a takeoff.

ie in E2 the function will check the column B for cells containing the text strings in A16:A18 (the consoles) and return any results along with the corresponding quantity to columns E and F. Similarly this will occur for the controller and cables.

I'm sure there's a solution somewhere but I've been unable to find one for lack of knowing what to search exactly.

Thanks for any help guys, it's appreciated.

What you may want to use is the COUNTIF function. Try this:

COUNTIF(A$2:A$13,"*" & A16 & "*")

If I am not mistaken you can check for the values in A16:A23 in the database dump column B1:B13, then you want the summer quantity for the matching values, where a match means the text you look for must be contained in the database dump column.

To get the quantity accordingly use the following formula in cell B16:

=SUMIFS(C$2:C$13;B$2:B$13;"*"&A16&"*")

then drag it into the other cells. The asterisks are text wildcards, so there may be text in front or behind the text part we look for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM