New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Returning the # of times a number occurs in a week

Formulas, Functions, Formatting, Charts, Data Analysis, etc.

Returning the # of times a number occurs in a week

Postby Nomakaa » Wed Jan 20, 2016 1:32 pm

Hi all,

I've been using excel for quite a while but have never come across this. I'm trying to find the number of times a value occurs during a 7-day week (Sunday-Saturday). The problem is, not all #s occur for all days and some #s occur over multiple weeks. Currently, I have this:

=IF(D2=D1,IF(OR(E2="Sunday",E1="Saturday"),1,G1+1),1)

Where D2 is the # and D1 is what it's matching against.

But if there is no Sunday or Saturday, the number of occurrences just increases (ex: number occurs Tues-Thurs over multiple weeks). I also have the dates but I'm not sure how to return the value 1-7 for any given week.

Any help would be greatly appreciated.

Thanks!
  • 0

Nomakaa
Rookie
 
Posts: 1
Joined: Jan 20, 2016
Reputation: 0
Excel Version: Pro Plus 2010

Re: Returning the # of times a number occurs in a week

Postby pecoflyer » Thu Jan 21, 2016 3:55 am

Hi and welcome to the board
Perhaps post a sample sheet showing what you have and expected results?

Cheers
  • 0

A relevant topic title helps get faster and more answers
pecoflyer
Moderator
 
Posts: 1274
Joined: Jan 24, 2012
Location: Belgium
Reputation: 39
Excel Version: 2003/2007/2010


Return to General Excel Questions

Who is online

Users browsing this forum: Google [Bot] and 105 guests