Be Excellent To Each Other

And, you know, party on. Dude.

All times are UTC [ DST ]




Reply to topic  [ 16 posts ] 
Author Message
 Post subject: Excel question
PostPosted: Tue Mar 06, 2012 16:30 
User avatar
Gogmagog

Joined: 30th Mar, 2008
Posts: 48899
Location: Cheshire
If I'm, oh I dunno, running a list of people that were arrested during 11pm punchups outside pubs in several cituies, from one week to the next, and wanted to know the frequency of each offender's detainment, what's the best way of doing this?

I'll be wanting to get data from 5 sheets and stick it all in one, and then to be able to look and say "Scrappy Mcfighty has been arrested every weekend this month".

I thought about VLOOKUP each value, but then it gets complicated from the third column onwards, as I've got to start chucking filters on. Is there something that'll say "Scrappy Mcfighty each week" or, even better, "Scrappy McFighty in Manchester, Leeds, Bradford and bingley"?

_________________
Mr Chris wrote:
MaliA isn't just the best thing on the internet - he's the best thing ever.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Tue Mar 06, 2012 16:49 
User avatar

Joined: 31st Mar, 2008
Posts: 925
Pivot tables might help to summarise the data a bit.

Pivot tables are cool.

Or use the countif function multiple times for each combination you want to test.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Tue Mar 06, 2012 16:53 
User avatar
Gogmagog

Joined: 30th Mar, 2008
Posts: 48899
Location: Cheshire
Bluecup wrote:
Pivot tables might help to summarise the data a bit.

Pivot tables are cool.



Yeah. I think I'm going to have to break the information down to person by location, and then deep diving to look for any patterns. I'm trying to work my head around which questions I need to ask , if you see what I mean, to find out why X,Y and Z do Q. or something. I'm going home in five minutes, so I'll have a think about it in the shower tomorrow.

_________________
Mr Chris wrote:
MaliA isn't just the best thing on the internet - he's the best thing ever.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Tue Mar 06, 2012 16:55 
User avatar
Gogmagog

Joined: 30th Mar, 2008
Posts: 48899
Location: Cheshire
I think the questions are "Who is where and how often?", "Who is most often where" and "Is it the person, and other(s) in location(s)". I need to discover if it is the person or the location at first, then look at different people in that location. This could be quite a big spreadsheet.

_________________
Mr Chris wrote:
MaliA isn't just the best thing on the internet - he's the best thing ever.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Tue Mar 06, 2012 17:37 
Awesome
User avatar
Yes

Joined: 6th Apr, 2008
Posts: 12334
Put it in an Access database. Heh.

_________________
Always proof read carefully in case you any words out


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Tue Mar 06, 2012 17:43 
SupaMod
User avatar
Est. 1978

Joined: 27th Mar, 2008
Posts: 69715
Location: Your Mum
You want a COUNTIF, don't you? Or, more accurately, a SUM of COUNTIFs.

So say sheet1 to sheet5 had the list of offenders in the A column, to find out how often the chap in the first cell of the first sheet had been arrested you'd want:
Code:
=SUM(COUNTIF(Sheet1!A:A,Sheet1!A1),COUNTIF(Sheet2!A:A,Sheet1!A1),COUNTIF(Sheet3!A:A,Sheet1!A1),COUNTIF(Sheet4!A:A,Sheet1!A1),COUNTIF(Sheet5!A:A,Sheet1!A1))


I hope there's a better way of doing it than that :S

_________________
Grim... wrote:
I wish Craster had left some girls for the rest of us.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Tue Mar 06, 2012 17:46 
SupaMod
User avatar
Est. 1978

Joined: 27th Mar, 2008
Posts: 69715
Location: Your Mum
MaliA wrote:
deep diving

Stop it.

_________________
Grim... wrote:
I wish Craster had left some girls for the rest of us.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Tue Mar 06, 2012 17:49 
Awesome
User avatar
Yes

Joined: 6th Apr, 2008
Posts: 12334
Tools > Data Analysis. Histogram Plug-in might help.

_________________
Always proof read carefully in case you any words out


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Tue Mar 06, 2012 17:50 
Best
User avatar
Board Mother

Joined: 6th Apr, 2008
Posts: 11395
Location: Mount Olympus
Grim... wrote:
MaliA wrote:
deep diving

Stop it.

:?:

_________________
Doctor Glyndwr wrote:
GJ is right.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Wed May 16, 2012 10:21 
User avatar
Gogmagog

Joined: 30th Mar, 2008
Posts: 48899
Location: Cheshire
MaliA wrote:
Excel 2010 me do, please.

If value in cell A2 is >100 and the value in Sheet 2 B2 is >30 I want it to say ATTENTION, and if not Check?

I've written this, but it doesn't work:

=IF(Sheet1!B2>100,IF Sheet2!B2>30,"Attention","Check",,)

I suppose the question is how do I do IF THEN statements in excel 2010?


Grim... wrote:
Craster wrote:
Off the top of my head

IF((sheet1!a1>100) and (sheet1!a2>30),"attention","check")

Not sure that's right - doesn't Excel have an 'AND' function?

Code:
IF(AND(sheet1!a1>100,sheet1!a2>30),"attention","check")


Also - fucking Hell Mali, learn to use topics.


That works, thank you.

How could I combine these two things?

Code:
=VLOOKUP(A2,Sheet1!A:B,2,0)-VLOOKUP(A2,Sheet1!A:C,3,0)
=IF(AND(Sheet1!B2>100,'160512'!B2>30),"attention","check")


EDIT: I'm probably better off doing all the calculations on a sheet, theng enerating the outcome in a different one, aren't I?

_________________
Mr Chris wrote:
MaliA isn't just the best thing on the internet - he's the best thing ever.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Wed May 16, 2012 10:31 
User avatar
Gogmagog

Joined: 30th Mar, 2008
Posts: 48899
Location: Cheshire
Gah! Scrub the above.

If the number is between 12-30 I want it to say "Check", 0-12 "OK" and >30 "Attention". I also want it to do work for negative numbers, so if there is a +ve or -ve swing, it'll pick it up. I can't nest these calculations.

Sorry to be a pain.

_________________
Mr Chris wrote:
MaliA isn't just the best thing on the internet - he's the best thing ever.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Wed May 16, 2012 10:32 
Awesome
User avatar
Yes

Joined: 6th Apr, 2008
Posts: 12334
Have one calculation create the result in another column, and then do your next calculation on the new column?

_________________
Always proof read carefully in case you any words out


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Wed May 16, 2012 10:34 
SupaMod
User avatar
Est. 1978

Joined: 27th Mar, 2008
Posts: 69715
Location: Your Mum
MaliA wrote:
Gah! Scrub the above.

If the number is between 12-30 I want it to say "Check", 0-12 "OK" and >30 "Attention". I also want it to do work for negative numbers, so if there is a +ve or -ve swing, it'll pick it up. I can't nest these calculations.

Sorry to be a pain.

Assuming "the number" is in A1:
Code:
IF(A1>30, "Attention", IF(A1>12, "Check", "OK"))


When you say "work for negative numbers", do you mean that something lower than -30 will also say "Attention"?

_________________
Grim... wrote:
I wish Craster had left some girls for the rest of us.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Wed May 16, 2012 10:41 
User avatar
Gogmagog

Joined: 30th Mar, 2008
Posts: 48899
Location: Cheshire
Yes, that'd be lovely. The real problem I'm havin is nesting the statements, I think.

_________________
Mr Chris wrote:
MaliA isn't just the best thing on the internet - he's the best thing ever.


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Wed May 16, 2012 10:48 
SupaMod
User avatar
Commander-in-Cheese

Joined: 30th Mar, 2008
Posts: 49244
MaliA wrote:
Yes, that'd be lovely. The real problem I'm havin is nesting the statements, I think.


ABS is the function you want.

Code:
IF(ABS(A1)>30, "Attention", IF(ABS(A1)>12, "Check", "OK"))

_________________
GoddessJasmine wrote:
Drunk, pulled Craster's pork, waiting for brdyime story,reading nuts. Xz


Top
 Profile  
 
 Post subject: Re: Excel question
PostPosted: Wed May 16, 2012 11:32 
User avatar
Gogmagog

Joined: 30th Mar, 2008
Posts: 48899
Location: Cheshire
That's superb, thank you. With your help I've come up with this:

ZOMG Spoiler! Click here to view!
Code:
=IF(ABS(B2-C2)>(500),"500 swing",IF(ABS(B2-C2)>(200),"200 swing",IF(ABS(B2-C2)>(100),"100 swing",IF(ABS((B2-C2)/B2)>0.3,"30% swing",IF(ABS((B2-C2)/B2)>0.5,"50% swing",IF(ABS(B2-C2)>(50),"Small change","OK"))))))


<proud>

_________________
Mr Chris wrote:
MaliA isn't just the best thing on the internet - he's the best thing ever.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 16 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Columbo, KovacsC, The Greys and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search within this thread:
You are using the 'Ted' forum. Bill doesn't really exist any more. Bogus!
Want to help out with the hosting / advertising costs? That's very nice of you.
Are you on a mobile phone? Try http://beex.co.uk/m/
RIP, Owen. RIP, MrC. RIP, Dimmers.

Powered by a very Grim... version of phpBB © 2000, 2002, 2005, 2007 phpBB Group.