There is no built in function in excel to sum/count/average by colour. Ap is kam k leye User Define Function (UDF) ya Macro Istimal Kar Sakte Hain.
Jo k m khod istimal karta hon kabhe kabhar. If you like the Follow this procedure.
1. Alt+F11
2. Open honw wali window m
Insert k menu sa
Module Select karai.
3. ye code paster kar k window close kar dain ya "ALT+Q" press Karain.
Code:
Function SumByRedFont(InRange As Range)
Dim Rng As Range
Application.Volatile True
For Each Rng In InRange.Cells
If Rng.Font.ColorIndex = 3 And IsNumeric(Rng.Value) Then
SumByRedFont = SumByRedFont + Rng.Value
End If
Next Rng
End Function
ab ap apna ye forumla jahan par apko zararot ha is tarah istimal Karain.
Code:
=SumByRedFont('yourrange')
Note:
1. Please yad rakhain k excel m color index no sa jane jate hain. Yani Black k index no.1 ha. aur red ka 3 ha. Ye function sirf red k leye lekha ha is leye ya sirf red fonts wale cell he ko sum karain ga agar fint pink ya red sa milta julta ho ya red aur kisi aur color ka combination ho to kam nahee kare ga.
2. M ye code khod bohat arsa sa use karta hon lekan mujhe is k orignal author ka nahee maloom is leye sara credit origional author ko jata ha.( Halanka m khod macro programing kar leta hon lekan thanks to origional author).
regards,
Bookmarks