Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.

## knoydart

880 posts

Ultimate Geek

Trusted

# 110657 13-Oct-2012 12:40

Hi,

struggling with this small problem with a spreadsheet and wondered if anyone can nudge me in the right direction.

I have spreadsheet with column a having instances of ¨1¨ indicating an event or count should occur. I wish in a further column  to keep a count of the 1´s but when the count reaches 12, I´d like to reset the count to 0 again. I´ve managed to get so far as using an OR inside an IF function which tests the value of the count and will set the value to 0 but I´d like to restart the count again.

Do I need to look towards a COUNTIF function, else where of can I use some logic inside of an IF formula to just go up to 12 and reset.

Thanks

Knoydart.

## tigercorp

637 posts

Ultimate Geek

Subscriber

# 700617 13-Oct-2012 13:07

Just use the modulo function to return the remainder after dividing by 12. So if your 1's are in column A then:
=mod(sum(A:A),12)

## Bee

593 posts

Ultimate Geek

# 700628 13-Oct-2012 13:12

And this to make the 12 display as 12 and not 0

=IF(MOD(Sum(A:A,12)=0,12,MOD(Sum(A:A,12))

## knoydart

880 posts

Ultimate Geek

Trusted

# 700634 13-Oct-2012 13:28

Thanks both of you for your swift response and help.

Works like a treat. Another EXCEL formula in to abuse

News »

Vodafone integrates eSIM into device and wearable roadmap
Posted 17-Jan-2020 09:45

Do you need this camera app? Group investigates privacy implications
Posted 16-Jan-2020 03:30

JBL launches headphones range designed for gaming
Posted 13-Jan-2020 09:59

Withings introduces ScanWatch wearable combining ECG and sleep apnea detection
Posted 9-Jan-2020 18:34

NZ Police releases public app
Posted 8-Jan-2020 11:43

Suunto 7 combine sports and smart features on new smartwatch generation
Posted 7-Jan-2020 16:06

Intel brings innovation with technology spanning the cloud, network, edge and PC
Posted 7-Jan-2020 15:54

AMD announces high performance desktop and ultrathin laptop processors
Posted 7-Jan-2020 15:42

AMD unveils four new desktop and mobile GPUs including AMD Radeon RX 5600
Posted 7-Jan-2020 15:32

Consolidation in video streaming market with Spark selling Lightbox to Sky
Posted 19-Dec-2019 09:09

Intel introduces cryogenic control chip to enable quantum computers
Posted 10-Dec-2019 21:32

Vodafone 5G service live in four cities
Posted 10-Dec-2019 08:30

Samsung Galaxy Fold now available in New Zealand
Posted 6-Dec-2019 00:01

NZ company oDocs awarded US\$ 100,000 Dubai World Expo grant
Posted 5-Dec-2019 16:00

New Zealand Rugby Selects AWS-Powered Analytics for Deeper Game Insights
Posted 5-Dec-2019 11:33

Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.