Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Summings cells in Italics
Is there a way to sum ONLY the values in Italics in a column of data?
Any help would be most appreciated |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Summings cells in Italics
Luke,
This can be done only with VBA code: Function SumItalics(InputRange As Range) As Double Dim Total As Double Dim Rng As Range For Each Rng In InputRange.Cells If IsNumeric(Rng.Value) = True Then If Rng.Font.Italic = True Then Total = Total + Rng.Value End If End If Next Rng End Function You can call this from a cell with a formula like =SumItalics(A1:A100) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting LLC www.cpearson.com (email on the web site) "Luke" wrote in message ... Is there a way to sum ONLY the values in Italics in a column of data? Any help would be most appreciated |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Summings cells in Italics
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Luke" wrote in message ... Is there a way to sum ONLY the values in Italics in a column of data? Any help would be most appreciated |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Summings cells in Italics
Only by VBA
Sub SumItalics() Dim cell As Range Dim tmp For Each cell In Columns(12).Cells If cell.Font.Italic Then tmp = tmp + cell.Value End If Next cell MsgBox tmp End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Luke" wrote in message ... Is there a way to sum ONLY the values in Italics in a column of data? Any help would be most appreciated |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If cell is Bold then 1, if cell is Italics then 2? | Excel Discussion (Misc queries) | |||
Excel: match two cells in one sheet to two cells in another and return a third cells value | Excel Worksheet Functions | |||
Stuck in Italics | Excel Discussion (Misc queries) | |||
bold italics or underline | Excel Discussion (Misc queries) | |||
If cell is Bold then 1, if cell is Italics then 2? | Excel Discussion (Misc queries) |