Hello everyone

I am new to this forum and fairly new to Excel. I have figured out a few things myself but still have a good way to go.

I have a question about the IF-function.

In my function, the numbers from 1 to 12 are equated with the twelve keys on the piano.
C=1
C#=2
D=3
E-flat=4
Etc.

The function looks like this (written in A2):

=IF(A1=1,"C",IF(A1=2,"C#",IF(A1=3,"D",IF(A1=4,"Eb",IF(A1=5,"E",IF(A1=6,"F",IF(A1=7,"F#",IF(A1=8,"G",IF(A1=9,"G#",IF(A1=10,"A",IF(A1=11,"Bb",IF(A1=12,"B"))))))))))))

So far so good. But now I need each tone to equate to multiples of 12 including negative values.

C=1, 13, 25, 37, … but also -11, -23, -35, ….
C#= 2, 14, 26, … but also -10, -22, -34, …
Etc.

I have managed to do this for the first tone “C” and stopped just below 100.

=IF(OR(A1=1,A1=13,A1=25,A1=37,A1=49,A1=61,A1=73,A1=85,A1=97,A1=-11,A1=-23,A1=-35,A1=-47,A1=-59,A1=-71,A1=-83,A1=-95,),"C")


I am not able to write a function that does this for the remaining eleven tones, so that whatever number I write into A1 it would produce a note-name in A2.


Can anyone help?
Thank you.