Index Match with return a value "Yes" or "No"

Gesyca_is_joy

Board Regular
Joined
Apr 24, 2014
Messages
90
Office Version
  1. 365
Platform
  1. Windows
I have three tabs in a file, one is a list of projects and looks something like this:

Project NumberProject Name
1234Sales Software Development
4567Marketing materials
7894Furniture Purchase
8829Sales Suite Fit Out

on tab two I have an invoice log where i enter all the invoices against any project spend:

Invoice NumberSiteAmountProject CodeProject Type
Invoice 1HQ$50,0001234
Invoice 2Michigan DC$14,0004567
Invoice 3Washington State$7,5008829

I want to make a third tab which pulls total spend by project cluster and location but what I need it to is add a column called "Project Type" to the back end of my Invoice log, that looks at the project code in that table, finds it on the Project tab, then looks at the Project Name column for that Project and, if the project name has "Sales" in it, returns a value True False

LocationTotal Spend
Michigan DCSum of all projects that have "Sales" in their Project Name
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
=COUNTIFS(Sheet1!A2:A5,Sheet2!D2,Sheet1!B2:B5,"*"&"sales"&"*")>0
will proved the true false

I want to make a third tab which pulls total spend by project cluster and location
whats a project cluster ?

the example
Michigan DC , does not have sales in the example

TAB1
Book3
AB
1Project NumberProject Name
21234Sales Software Development
34567Marketing materials
47894Furniture Purchase
58829Sales Suite Fit Out
Sheet1


TAB2
Book3
ABCDE
1Invoice NumberSiteAmountProject CodeProject Type
2Invoice 1HQ$50,0001234TRUE
3Invoice 2Michigan DC$14,0004567FALSE
4Invoice 3Washington State$7,5008829TRUE
Sheet2
Cell Formulas
RangeFormula
E2:E4E2=COUNTIFS(Sheet1!A2:A5,Sheet2!D2,Sheet1!B2:B5,"*"&"sales"&"*")>0


SUMIFS() is probably the formula ??? but I'm not sure whats required on the 3rd TAB

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Upvote 0
Solution
=COUNTIFS(Sheet1!A2:A5,Sheet2!D2,Sheet1!B2:B5,"*"&"sales"&"*")>0
will proved the true false


whats a project cluster ?

the example
Michigan DC , does not have sales in the example

TAB1
Book3
AB
1Project NumberProject Name
21234Sales Software Development
34567Marketing materials
47894Furniture Purchase
58829Sales Suite Fit Out
Sheet1


TAB2
Book3
ABCDE
1Invoice NumberSiteAmountProject CodeProject Type
2Invoice 1HQ$50,0001234TRUE
3Invoice 2Michigan DC$14,0004567FALSE
4Invoice 3Washington State$7,5008829TRUE
Sheet2
Cell Formulas
RangeFormula
E2:E4E2=COUNTIFS(Sheet1!A2:A5,Sheet2!D2,Sheet1!B2:B5,"*"&"sales"&"*")>0


SUMIFS() is probably the same ??? but not sure
Apologies, a project cluster is a group of related projects, that have individual project codes but are all interconnected. So i would eventually need to be able to pull total spend for any given location for any given cluster of sales projects. but the clusters are text strings, such as "Sales" in the example.
 
Upvote 0
still missing what you need really sorry

in your example you have 2 rows with sales in
Project - 1234
Project - 8829
so these are a CLUSTER
But the location is
HQ
and
Washington State

so non have
Michigan DC
LocationTotal Spend
Michigan DCSum of all projects that have "Sales" in their Project Name

as shown in your example

I'm sorry i'm missing these

But i suspect a SUMIFS() is what you are looking for
just not sure how to construct the criteria

Or how to create the TAB 3
 
Upvote 0
Nope, the formula you put up was perfect, it worked like a charm. and returned a TRUE/FALSE that I then used on tab three as a criteria for Sum IFS

So it turned out I already had the formula mostly correct but the "*"&"sales"&"*" part of the equation was wrong, I hate doing stuff off text but that's all i have with the base file I get. I didn't type that part in correctly and so the formula failed.
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,167
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top