Matthew McGovern
Matthew McGovern

Reputation: 1

Excel If/Then Formula

so I need help with a very simple if/then statement in Excel. I was never very good at coding...so here I am.

I have a column that includes attendance for an event. If a cell in this column (lets say A1) reaches the number 8, I need the cell next to it (B1) to increase by 1. If "A1" reaches 16, I need (A2) to increase to 2. ...and so on for multiples of 8.

I'm sure it's very simple, but I'm new to working with equations in Excel, so any help would be appreciated! Thanks!

Upvotes: 0

Views: 124

Answers (2)

user2977664
user2977664

Reputation: 97

If column A has all the attendance figures [1,2,3,4,5...etc] then in column B2 enter the formula:

=if(mod(a1,8)=0,B1+1,B1)

Drag this down through the rest of column B for all values in column A

Mod(a1,8) returns the remainder of A1 / 8. If it's divisible by 8 the remainder will be 0. Since you want a count, we can keep it in column B and just add 1 to the previous value.

Upvotes: 0

Stidgeon
Stidgeon

Reputation: 2723

You want a simple formula like:

= ROUNDDOWN(A1/8, 0)

For B1

Upvotes: 1

Related Questions