Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 142
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If cell is Bold then 1, if cell is Italics then 2? Yong Sheng Excel Discussion (Misc queries) 4 May 8th 23 07:44 PM
Excel: match two cells in one sheet to two cells in another and return a third cells value Spence Excel Worksheet Functions 3 February 13th 11 05:33 AM
Stuck in Italics Tim Excel Discussion (Misc queries) 1 May 16th 05 12:33 AM
bold italics or underline Dorothy Excel Discussion (Misc queries) 5 February 16th 05 03:15 PM
If cell is Bold then 1, if cell is Italics then 2? Yong Sheng Excel Discussion (Misc queries) 0 December 31st 04 05:41 AM


All times are GMT +1. The time now is 04:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"