Front Office Football Central  

Go Back   Front Office Football Central > Archives > FOFC Archive
Register FAQ Members List Calendar Mark Forums Read Statistics

Reply
 
Thread Tools
Old 03-17-2010, 11:34 AM   #1
Passacaglia
Coordinator
 
Join Date: Oct 2000
Location: Big Ten Country
Another Excel help thread

I'm trying to use the sumif function, but instead of a column of cells in my test range, I want to make my test range the same cell in 20 different tabs. So here's my formula:

=SUMIF('40033:61101'!$A$2,$A$2,'40033:61101'!$B$26)

Where 40033....61101 are the 20 tabs. If cell A2 of that tab is the same as cell A2 of the tab my formula is in, I want to add cell B26 of that tab. But sumif doesn't like it when I go across tabs like that instead of a range within one tab.

Any ideas?

Passacaglia is offline   Reply With Quote
Old 03-17-2010, 12:52 PM   #2
Bobble
College Prospect
 
Join Date: Nov 2006
Location: High and outside
I think you have to go with SUMPRODUCT. I stole this from teh intarwebs:

Quote:

Two options...

1]

=SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!A2:A10"),D2,INDIRECT("'"&SheetList&"'!B2:B10")))

where SheetList refers to a range that lists the relevant sheet names, A2:B10 the relevant range in every sheet in SheetList, and D2 the criterion value.

2] Using the morefunc.xll add-in...

=SUMPRODUCT(--(THREED(Sheet2:Sheet3!$A$2:$A$10)=D2),(THREED(Sheet2:Sheet3!$B$2:$B$10)))

where Sheet2 and Sheet3 are the relevant sheets while A2:B10 is the relevant range and D2 the criterion.
Bobble is offline   Reply With Quote
Old 03-17-2010, 01:24 PM   #3
SteveMax58
College Starter
 
Join Date: Dec 2006
I was thinking something like what Bobble had posted in Option 1. But I dont think you're looking for the product.

Do you have Excel 2007 or 2003?
SteveMax58 is offline   Reply With Quote
Old 03-17-2010, 01:36 PM   #4
Passacaglia
Coordinator
 
Join Date: Oct 2000
Location: Big Ten Country
Right, I'm not looking for a product -- just a sum. I'm not really following Bobble's example right now, but I've got a decent enough workaround going now anyway. I have Excel 2003.
Passacaglia is offline   Reply With Quote
Old 03-17-2010, 01:56 PM   #5
SteveMax58
College Starter
 
Join Date: Dec 2006
Without using an aggregation Worksheet (or range of cells) you could use 20 SUMIF statements.

If that sounds like a terrible idea (or 2003 does not support that many characters/functions in a formula)...I think you might need to just make an aggregation worksheet (or range of cells) to each perform a SUMIF for you. Then you could just add that range of cells.
SteveMax58 is offline   Reply With Quote
Old 03-17-2010, 01:59 PM   #6
Mike Lowe
College Prospect
 
Join Date: Aug 2006
Location: San Diego, CA
I have a different Excel question and instead of starting a new thread I figured I'd threadjack here for a minute:

I have an excel sheet which I'd like to have a cell where I'd input a letter and then have that letter generate a pre-written response into another cell.

I can do this with simple letters being counted across a row or whatever, but I want literally one letter to represent a pre-written statement:

John Smith - A (Spelling errors) or something along those lines.
__________________
Be fulfilled. Be grateful. Be good to one another.
@MikeLowe47 @SimSportsGamin9
Website | YouTube | Discord
Mike Lowe is offline   Reply With Quote
Old 03-17-2010, 02:13 PM   #7
SteveMax58
College Starter
 
Join Date: Dec 2006
Quote:
Originally Posted by Mike Lowe View Post
I have a different Excel question and instead of starting a new thread I figured I'd threadjack here for a minute:

I have an excel sheet which I'd like to have a cell where I'd input a letter and then have that letter generate a pre-written response into another cell.

I can do this with simple letters being counted across a row or whatever, but I want literally one letter to represent a pre-written statement:

John Smith - A (Spelling errors) or something along those lines.

So you want to have (for example) cell A1 as "John Smith", cell B1 as [enter a letter], and cell C1 as [pre-written text] ?

If so...use VLOOKUP. Like this (in cell C1):

=VLOOKUP(B1, [2x2 Range of cells], 2, FALSE)

EDIT to add: Make sure your letters are furthest to the left in your 2x2 range of cells.

Last edited by SteveMax58 : 03-17-2010 at 02:15 PM.
SteveMax58 is offline   Reply With Quote
Old 03-17-2010, 02:45 PM   #8
Bobble
College Prospect
 
Join Date: Nov 2006
Location: High and outside
Quote:
Originally Posted by Passacaglia View Post
Right, I'm not looking for a product -- just a sum. I'm not really following Bobble's example right now, but I've got a decent enough workaround going now anyway. I have Excel 2003.

Yeah, SUMPRODUCT can be very confusing. It's just a way to get an array of values to multiply times an array of whether to USE those values.
So you need an array of all the values in cell A2 of all the sheets and an array of 1's and 0's signalling which of those values to use. SUM the PRODUCT of those two arrays and you effectively have a SUMIF across sheets.

Anyway, I attached a sample worksheet using method 1. I put values in cell A6 of 3 sheets. My criteria for whether to sum them is in D2 ("> 0"). The formula is in A1. Oh, and the list of sheet names is in cells G6:G8 and is a named range called "SheetList". Hope it helps.
Attached Files
File Type: xls Pass.xls (13.5 KB, 2 views)

Last edited by Bobble : 03-17-2010 at 02:49 PM.
Bobble is offline   Reply With Quote
Old 03-17-2010, 03:00 PM   #9
Passacaglia
Coordinator
 
Join Date: Oct 2000
Location: Big Ten Country
Quote:
Originally Posted by Bobble View Post
Yeah, SUMPRODUCT can be very confusing. It's just a way to get an array of values to multiply times an array of whether to USE those values.
So you need an array of all the values in cell A2 of all the sheets and an array of 1's and 0's signalling which of those values to use. SUM the PRODUCT of those two arrays and you effectively have a SUMIF across sheets.

Anyway, I attached a sample worksheet using method 1. I put values in cell A6 of 3 sheets. My criteria for whether to sum them is in D2 ("> 0"). The formula is in A1. Oh, and the list of sheet names is in cells G6:G8 and is a named range called "SheetList". Hope it helps.

I think I get it. The thing is, I need to take the info from the 40 tabs I already have and put it in 11 new tabs. Would I then need 11 different ranges, one for each tab?

The good news is, though, that I managed to get everything I needed by going to the tabs that my initial 40 tabs were pulling from, so the problem is solved!
Passacaglia is offline   Reply With Quote
Old 03-17-2010, 03:01 PM   #10
Mike Lowe
College Prospect
 
Join Date: Aug 2006
Location: San Diego, CA
Quote:
Originally Posted by SteveMax58 View Post
So you want to have (for example) cell A1 as "John Smith", cell B1 as [enter a letter], and cell C1 as [pre-written text] ?

If so...use VLOOKUP. Like this (in cell C1):

=VLOOKUP(B1, [2x2 Range of cells], 2, FALSE)

EDIT to add: Make sure your letters are furthest to the left in your 2x2 range of cells.

Still lost, sorry!

Joe Smith 1 Student struggling with spelling concepts

How would I make it so that cell 1C, when a "1" is entered in cell 1B, says "Student struggling with spelling concepts"
__________________
Be fulfilled. Be grateful. Be good to one another.
@MikeLowe47 @SimSportsGamin9
Website | YouTube | Discord
Mike Lowe is offline   Reply With Quote
Old 03-17-2010, 03:05 PM   #11
Bobble
College Prospect
 
Join Date: Nov 2006
Location: High and outside
Quote:
Originally Posted by Passacaglia View Post
I think I get it. The thing is, I need to take the info from the 40 tabs I already have and put it in 11 new tabs. Would I then need 11 different ranges, one for each tab?

The good news is, though, that I managed to get everything I needed by going to the tabs that my initial 40 tabs were pulling from, so the problem is solved!

Is it different "SUMIF" criteria for the 11 tabs? Then you're just looking at a seperate SUMPRODUCT statement for each tab.

If I want to sum every value greater than 7 from the 40 tabs and put that on Tab1, then Tab1 would just have the SUMPRODUCT formula in cell A1 with a criteria of "> 7" in cell D2. If you wanted to sum every value less than 3 and put that on Tab2, then Tab2 would have the SUMPRODUCT formula in it's A1 and a criteria of "< 3" in it's D2. Or, am I not understanding?

Last edited by Bobble : 03-17-2010 at 03:06 PM.
Bobble is offline   Reply With Quote
Old 03-17-2010, 03:07 PM   #12
Passacaglia
Coordinator
 
Join Date: Oct 2000
Location: Big Ten Country
Mike --

Take one of your tabs, and call it 'key' In that tab, in Column A, put the numbers. In Column B, put the corresponding messages. So Cell A1 will say "1" and Cell B1 will say "Student struggling with spelling concepts"

In another tab, use column A to enter your numbers, and in Cell B1, paste this formula:

=VLOOKUP(A1,key!$A:$B,2,0)

Then copy Cell B1, and paste it down for all the new numbers you've typed into Column A.
Passacaglia is offline   Reply With Quote
Old 03-17-2010, 03:12 PM   #13
Bobble
College Prospect
 
Join Date: Nov 2006
Location: High and outside
Quote:
Originally Posted by Mike Lowe View Post
Still lost, sorry!

Joe Smith 1 Student struggling with spelling concepts

How would I make it so that cell 1C, when a "1" is entered in cell 1B, says "Student struggling with spelling concepts"


You have a table in two columns, say, cells D1:E3 that looks like this:
D | E
1 | Student struggling
2 | Student stinks
3 | Student slow on the uptake

Then in cell C1 you put that vlookup formula =vlookup(B1, D1:E3, 2). Its telling excel to look up the value in B1, find that value on the table in D1 : E3, and print out the value in the second column of that table. In this case it looks at B1 and finds a 1. It goes to the table, finds 1 and then looks across to the second column and would return back with "Student struggling".
Bobble is offline   Reply With Quote
Old 03-17-2010, 03:14 PM   #14
Passacaglia
Coordinator
 
Join Date: Oct 2000
Location: Big Ten Country
Quote:
Originally Posted by Bobble View Post
Is it different "SUMIF" criteria for the 11 tabs? Then you're just looking at a seperate SUMPRODUCT statement for each tab.

If I want to sum every value greater than 7 from the 40 tabs and put that on Tab1, then Tab1 would just have the SUMPRODUCT formula in cell A1 with a criteria of "> 7" in cell D2. If you wanted to sum every value less than 3 and put that on Tab2, then Tab2 would have the SUMPRODUCT formula in it's A1 and a criteria of "< 3" in it's D2. Or, am I not understanding?

No, this was exactly right. Thanks!
Passacaglia is offline   Reply With Quote
Old 03-17-2010, 03:27 PM   #15
Mike Lowe
College Prospect
 
Join Date: Aug 2006
Location: San Diego, CA
Thanks guys, got it!
__________________
Be fulfilled. Be grateful. Be good to one another.
@MikeLowe47 @SimSportsGamin9
Website | YouTube | Discord
Mike Lowe is offline   Reply With Quote
Old 03-17-2010, 03:30 PM   #16
Passacaglia
Coordinator
 
Join Date: Oct 2000
Location: Big Ten Country
Quote:
Originally Posted by Passacaglia View Post
No, this was exactly right. Thanks!

Oh, with one caveat -- I wasn't able to copy and paste that cell all over the tab, so I used the address function, and ended up with a formula like this:

=SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!$A$2"),$A$2,INDIRECT(ADDRESS(ROW(B14),COLUMN(B14),,,""&SheetList&""))))
Passacaglia is offline   Reply With Quote
Old 03-17-2010, 03:32 PM   #17
Bobble
College Prospect
 
Join Date: Nov 2006
Location: High and outside
Quote:
Originally Posted by Passacaglia View Post
Oh, with one caveat -- I wasn't able to copy and paste that cell all over the tab, so I used the address function, and ended up with a formula like this:

=SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!$A$2"),$A$2,INDIRECT(ADDRESS(ROW(B14),COLUMN(B14),,,""&SheetList&""))))

Hmm, I've never used ADDRESS myself. You learn something new every day...
Bobble is offline   Reply With Quote
Old 03-17-2010, 03:35 PM   #18
Passacaglia
Coordinator
 
Join Date: Oct 2000
Location: Big Ten Country
Glad I could return the favor!
Passacaglia is offline   Reply With Quote
Old 03-17-2010, 04:47 PM   #19
SteveMax58
College Starter
 
Join Date: Dec 2006
Quote:
Originally Posted by Mike Lowe View Post
Thanks guys, got it!

Good deal.

Yeah, I probably confused things by saying a "2x2" table. Really I just meant AT LEAST 2 columns and as many rows as you have need for.
SteveMax58 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 07:29 AM.



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.