Numbering years and months

C

Colin Hayes

HI

I'm hoping that someone can help with a formula.

In column B , I have a formula which numbers to a maximum of 300. Each
number represents a monthly payment.

In column A I'd like to signal the start of each new year with 'Year 1"
, "Year 2" , "Year 3" etc as the numbers in column B reach 12 , 24 , 36
, 48 and so on.

If the cells in column B are zero in quantity , then so should be the
cells in A.

So :

A B

Year1 1
2
3
4
5
6
7
8
9
10
11
12
Year 2 13
14
15
16
17
18
19
20
21
22
23
24
Year 3 25




Hope someone can help.




Best Wishes
 
S

smartin

Colin said:
HI

I'm hoping that someone can help with a formula.

In column B , I have a formula which numbers to a maximum of 300. Each
number represents a monthly payment.

In column A I'd like to signal the start of each new year with 'Year 1"
, "Year 2" , "Year 3" etc as the numbers in column B reach 12 , 24 , 36
, 48 and so on.

If the cells in column B are zero in quantity , then so should be the
cells in A.

So :

A B

Year1 1
2
3
4
5
6
7
8
9
10
11
12
Year 2 13


Assuming you are starting in row 1, A1 is

=IF(MOD(B1,12)=1,"Year "&1+INT(B1/12),"")
 
C

Colin Hayes

Lars Klintholm said:
Try in cell A1

=IF(MOD(B1,12)=1,"year "&1+INT(B1/12),"")

Hi

OK thanks for that

It's working fine where the formula in Column B has returned a number.

Where the formula is not returning a number (and the cell is therefore
blank) , the formula above gives #Value! errors.

Is there a way around this? Effectively the formula in A needs to show
blank where the equivalent cell in B is blank.


Thanks again
 
L

Lars Klintholm

Hi

OK thanks for that

It's working fine where the formula in Column B has returned a number.

Where the formula is not returning a number (and the cell is therefore blank)
, the formula above gives #Value! errors.

Is there a way around this? Effectively the formula in A needs to show blank
where the equivalent cell in B is blank.

Try this one:

=IF(ISNUMBER(B1),IF(MOD(B1,12)=1,"year "&1+INT(B1/12),""),"")
 
C

Colin Hayes

Lars Klintholm said:
Try this one:

=IF(ISNUMBER(B1),IF(MOD(B1,12)=1,"year "&1+INT(B1/12),""),"")


Hi Lars

Yes , that's perfect. Exactly the solution.

Thanks Lars. Impressive...!



Best Wishes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top