I have a spreadsheet with two columns. Column A is "Total Time" and column B is "Month". Column A contains "hours" and the months in B are represented by numbers (e.g. January is represented by 1 and so on).

What I want to do is sum up values in Column A based on a condition in Column B.

For example:
"Sum COLUMN A, IF COLUMN B=1"
If column B contains the value 1 then it represents January and I want to sum the total of all the hours in January based on this. I will do this with every month to get a total amount of time used for each individual month.

Can any help me with this?

Thanks