Jump to content


Photo

Do You Excel With Excel? - Help Appreciated


  • Please log in to reply
15 replies to this topic

#1 Ethel

Ethel

    ..is NOT a girl!

  • TMF Team
  • PipPipPipPipPipPipPipPipPipPipPip
  • 25,416 posts
  • Local Club: none

Posted 20 November 2007 - 03:09 PM

Anyone any good with formulas

I want to make a spread sheet that will look at a list and select all the values* within a year of the current date (or it could look the date up in a cell); add them up and work out a weekly average value.

Can't be that hard can it - any pointers?

* it only needs 2 columns one for dates and one for currency values.

#2 Millers Mini

Millers Mini

    Mini Mad

  • Members
  • PipPipPipPip
  • 166 posts
  • Location: Dymchurch, Kent
  • Local Club: National Mini Owners Club

Posted 20 November 2007 - 03:17 PM

Anyone any good with formulas

I want to make a spread sheet that will look at a list and select all the values* within a year of the current date (or it could look the date up in a cell); add them up and work out a weekly average value.

Can't be that hard can it - any pointers?

* it only needs 2 columns one for dates and one for currency values.


Have you tried the IF command?

#3 mad_scientist

mad_scientist

    Mini Mad

  • Members
  • PipPipPipPip
  • 211 posts
  • Local Club: island minis

Posted 20 November 2007 - 03:20 PM

Anyone any good with formulas

I want to make a spread sheet that will look at a list and select all the values* within a year of the current date (or it could look the date up in a cell); add them up and work out a weekly average value.

Can't be that hard can it - any pointers?

* it only needs 2 columns one for dates and one for currency values.

cant remember how to do averages yet, but just to add them up just highlight them all then another square underneath them then go to the figure that looks like a "z" and press and it should give answer if i remember rightly .could be wrong though

#4 Ethel

Ethel

    ..is NOT a girl!

  • TMF Team
  • PipPipPipPipPipPipPipPipPipPipPip
  • 25,416 posts
  • Local Club: none

Posted 20 November 2007 - 03:27 PM

Cheers folks,

I can just about manage the autosum bit and figured I'd need to get out me booleans (ooer). It's specifying the year range I expect to struggle with.

Toying with using Access so I can use a query but sure that'd be a long winded way of doing it.

Getting it all into 1 formula would be nice.

#5 Matt

Matt

    Up Into Fourth

  • TMF+ Member
  • PipPipPipPipPipPipPipPipPip
  • 4,703 posts
  • Location: Reading
  • Local Club: The mini forum - i live here

Posted 20 November 2007 - 03:31 PM

tell ya what..

you do an excel file with the data you want on it.. and send it to me.. and ill have a go
doesnt matter if its on 2 sheets.

#6 Millers Mini

Millers Mini

    Mini Mad

  • Members
  • PipPipPipPip
  • 166 posts
  • Location: Dymchurch, Kent
  • Local Club: National Mini Owners Club

Posted 20 November 2007 - 03:33 PM

I have done a sheet how do I upload it?

#7 Jupitus

Jupitus

    One Carb Or Two?

  • Members
  • PipPipPipPipPipPipPip
  • 1,479 posts
  • Local Club: Breathemini

Posted 20 November 2007 - 03:34 PM

If dates are in column A, and values are in column B, then the following formula cut n pasted in C helps:

=IF(TODAY()-A1<365,B1,0)

You can then autosum column C. :P

#8 Jammy

Jammy

    Moved Into The Garage

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 25,397 posts

Posted 20 November 2007 - 03:47 PM

If dates are in column A, and values are in column B, then the following formula cut n pasted in C helps:

=IF(TODAY()-A1<365,B1,0)

You can then autosum column C. :P

I believe that would sum the values of those in the past 365 days, which isn't quite the same as only selecting values in 2007, for example. Depends what Ethel wants to do.

Ethel, if you can upload a sample file with test data I'll be able to work something out, tis part of my job to do things like this.

#9 Jupitus

Jupitus

    One Carb Or Two?

  • Members
  • PipPipPipPipPipPipPip
  • 1,479 posts
  • Local Club: Breathemini

Posted 20 November 2007 - 03:50 PM

If dates are in column A, and values are in column B, then the following formula cut n pasted in C helps:

=IF(TODAY()-A1<365,B1,0)

You can then autosum column C. :P

I believe that would sum the values of those in the past 365 days, which isn't quite the same as only selecting values in 2007, for example. Depends what Ethel wants to do.

Ethel, if you can upload a sample file with test data I'll be able to work something out, tis part of my job to do things like this.



Well that does the 'within a year of the current date', which is what Eths asked for... to do 'in the same year as current date' you would use:

=IF(YEAR(TODAY())=YEAR(A1),B1,0)

instead...

#10 Jammy

Jammy

    Moved Into The Garage

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 25,397 posts

Posted 20 November 2007 - 03:52 PM

Yea, I just came up with:

=IF&#40;YEAR&#40;C2&#41;=2007, B2,&#34;&#34;&#41;

Where colum C has your dates, and column B has your data.

Substitue "2007" with the year you want to get results from.

#11 Matt

Matt

    Up Into Fourth

  • TMF+ Member
  • PipPipPipPipPipPipPipPipPip
  • 4,703 posts
  • Location: Reading
  • Local Club: The mini forum - i live here

Posted 20 November 2007 - 03:56 PM

smart arse :P

#12 Jupitus

Jupitus

    One Carb Or Two?

  • Members
  • PipPipPipPipPipPipPip
  • 1,479 posts
  • Local Club: Breathemini

Posted 20 November 2007 - 04:00 PM

Pfft - that's an easy one!! :P

#13 Ethel

Ethel

    ..is NOT a girl!

  • TMF Team
  • PipPipPipPipPipPipPipPipPipPipPip
  • 25,416 posts
  • Local Club: none

Posted 20 November 2007 - 04:43 PM

Thanks again guys (n' guyesses),

I haven't actually started on it yet, thought I'd be lazy 'n get a few pointers before I tie myself in knots.

I did mean the preceding 365 days 'n it can spill over more than one sheet.

I'll post it up once I've got somewhere with it.

Yay for TMF - kicks International rescue's ass any day :P

#14 Jupitus

Jupitus

    One Carb Or Two?

  • Members
  • PipPipPipPipPipPipPip
  • 1,479 posts
  • Local Club: Breathemini

Posted 20 November 2007 - 04:50 PM

Thanks again guys (n' guyesses),

I haven't actually started on it yet, thought I'd be lazy 'n get a few pointers before I tie myself in knots.

I did mean the preceding 365 days 'n it can spill over more than one sheet.

I'll post it up once I've got somewhere with it.

Yay for TMF - kicks International rescue's ass any day :P


The spilling over onto a new sheet isn't much of a problem although you may have to manually define the range for the totalling... the formula only references the cells to the immediate left without other dependancies. There are more sophisticated ways to do it but this one is the easiest, I would say.

#15 paulrockliffe

paulrockliffe

    Camshaft & Stage Two Head

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,763 posts
  • Location: Durham

Posted 20 November 2007 - 06:22 PM

I used the AVERAGEIF Function as follows:

"=AVERAGEIF(B4:B21,">C3",C4:C21)"

Where C3 contains the forumla "=TODAY()-365"

That should work, however it returns a "#DIV/0!" Error and I have no idea why?? Cells B4:B21 are full of dates and C4:C21 just numbers.

That's not much use to you, but if someone just corrects my mistake it'll work perfectly. Excel help says that this is a valid formula, "=AVERAGEIF(A2:A5,">250000",B2:B5)", so I'm not really sure what's going on????




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users