Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-23-2017, 07:33 AM
kiteman kiteman is offline Sumif to find a single word in a cell without using wildcard Windows XP Sumif to find a single word in a cell without using wildcard Office 2000
Novice
Sumif to find a single word in a cell without using wildcard
 
Join Date: Aug 2017
Posts: 2
kiteman is on a distinguished road
Default Sumif to find a single word in a cell without using wildcard

I have a group of cells on a tab with a list of cities and states, multiple cities and multiple states span down this column. for instance column A on this tab is



Atlanta, Georgia
Savannah, Georgia
Augusta Georgia

they have a corresponding column with a number of users in each city. I also have a second tab with a list of all the states in one column, and a corresponding column on that tab with total users per state. it's basically just a roll-up from the previous tab.

So I need a formula that can sumif the first city/state tab to see if it has the word "Georgia" in a cell and show the total for all the cities in Georgia on this second tab. The problem with using the wildcard here is that there are multiple countries involved in this exercise so writing out the wildcard each time would be very time consuming.

Really the sumif is set up perfectly since each tab has a column that does include the state name in it, however one of those tabs has additional words as well. the tab is locked by a client or else I would do a cheap text to columns to separate the city from the state on the first tab.

any help is appreciated!
Reply With Quote
  #2  
Old 08-23-2017, 09:09 AM
NBVC's Avatar
NBVC NBVC is offline Sumif to find a single word in a cell without using wildcard Windows 10 Sumif to find a single word in a cell without using wildcard Office 2013
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

You can extract those columns from that secured tab, to another tab and then do the text to columns in that new tab....

However, I don't see why the wildcard won't work.

If you have the word "Georgia" in say A2 of your summary tab, why couldn't you use =SUMIF('Other tab'!A:A,"*"&A2&"*",'Other tab'!B:B)

This will look at A2 for the word to search for in column A of the Other tab, and sum column B.

You can copy formula down, for example, to get state that is in A3, A4, etc...
Reply With Quote
  #3  
Old 08-23-2017, 09:34 AM
kiteman kiteman is offline Sumif to find a single word in a cell without using wildcard Windows XP Sumif to find a single word in a cell without using wildcard Office 2000
Novice
Sumif to find a single word in a cell without using wildcard
 
Join Date: Aug 2017
Posts: 2
kiteman is on a distinguished road
Default

Quote:
Originally Posted by NBVC View Post
You can extract those columns from that secured tab, to another tab and then do the text to columns in that new tab....

However, I don't see why the wildcard won't work.

If you have the word "Georgia" in say A2 of your summary tab, why couldn't you use =SUMIF('Other tab'!A:A,"*"&A2&"*",'Other tab'!B:B)

This will look at A2 for the word to search for in column A of the Other tab, and sum column B.

You can copy formula down, for example, to get state that is in A3, A4, etc...
That's great! I was forgetting the & in the formula. To continue to my next question...

The third tab has country totals, so let's just say in this sample size the US country only has five states. So a single cell on the third tab will say, "Georgia, Florida, Kentucky, Alabama, Virginia." Since the second tab lists all of these states on individual cells/rows, and this tab is combining them into one cell/row, is there any way to do a sumif to match add together ALL of the states that are listed in this one cell?

i guess i will add at this point the subgroups are getting smaller, so at this point i have about 120 regions being grouped into 20. i could do them manually if i had too, but a formula sure would be helpful.

thanks for the help!
Reply With Quote
  #4  
Old 08-23-2017, 10:14 AM
NBVC's Avatar
NBVC NBVC is offline Sumif to find a single word in a cell without using wildcard Windows 10 Sumif to find a single word in a cell without using wildcard Office 2013
The Formula Guy
 
Join Date: Mar 2012
Location: Mississauga, CANADA
Posts: 215
NBVC will become famous soon enoughNBVC will become famous soon enough
Default

Probably not with SUMIF, but it can be done with SUMPRODUCT.

e.g.

=SUMPRODUCT(--(ISNUMBER(MATCH("*"&$C$1:$C$5&"*",A1,0))),$D$1:$D$ 5)

Where A1 is the cell containing the 5 states, and C1:C5 is the list you want to look in to find the matches and sum the adjacent cells D1: D5.

Warning... with Sumproduct it is advisable to not use full column ranges as this function is more processor intensive.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumif to find a single word in a cell without using wildcard Using SUMIF to pull text from another cell as range kong1802 Excel 2 02-07-2017 11:04 AM
Sumif to find a single word in a cell without using wildcard Wildcard to find any one or more words Maksymromaniuk Word 1 11-02-2015 01:04 PM
Need Help With Find and Replace Wildcard rsrasc Word VBA 9 10-13-2015 02:37 PM
Sumif to find a single word in a cell without using wildcard Wildcard Find and Replace Ulodesk Word 1 06-23-2014 10:26 AM
Sumif to find a single word in a cell without using wildcard Need help using WildCard Find & Replace Cayce Word 1 06-09-2014 04:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft