Return a value "IF" a cell is a certian colour...

G

Guest

Guest
Good Day All,

I am a beginner Excel user who has been assigned a daunting task.

My spreadsheet will be used to calculate course cost per division (I have 5 divisions).

I have colour codes cells to denote which division a student is with in A4:A30. I have entered a cost for the course in I14.

In a cell I want to calculate how much each division owes based on the number of each coloured cell in the column multiplied by the course cost.

Any simple ideas (I'll even take more advanced ideas as I feel I'm getting the hang of some oft his stuff).

Thank you all so much for your consideration!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
You could insert this function in a standard VBA-module.
ex.
If you format a reference cell red this function will sim all red cells in an area.
=colorsum(area, A1)

Function ColorSum(rRange As Range, rColor As Range) As Double
Dim rCell As Range
Dim dSum As Variant
dSum = 0
Application.Volatile
For Each rCell In rRange
If rCell.Interior.ColorIndex = rColor.Interior.ColorIndex Then
If IsNumeric(rCell) Then dSum = dSum + rCell.Value
End If
Next rCell
ColorSum = dSum
End Function
 
Upvote 0

Forum statistics

Threads
1,213,582
Messages
6,114,472
Members
448,574
Latest member
bestresearch

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top