Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add cells with a specific format?

how can I add cells into another cell only if the format is right in the cell
I want to add
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Add cells with a specific format?

for each cell in Range("A1:A10")
if cell.Numberformat = "#,##0.00 then
tot = tot + cell.Value
end if
Next

Range("B11").Value = tot

--
Regards,
Tom Ogilvy




"qwery" wrote in message
...
how can I add cells into another cell only if the format is right in the

cell
I want to add



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Add cells with a specific format?

Well, there are many types of format, so you may need to be more explicit,
but this adds it if it is bold

For Each cell In Selection
If cell.Font.Bold Then
Range("H1").value = Range("H1").value + cell.Value
End If
Next cell

--

HTH

RP
(remove nothere from the email address if mailing direct)


"qwery" wrote in message
...
how can I add cells into another cell only if the format is right in the

cell
I want to add



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
how to count cells with specific format (background color)? Blackheartedowl Excel Discussion (Misc queries) 1 February 8th 06 08:21 AM
How can I find and format specific cells automatically in Excel? Amy Excel Worksheet Functions 1 August 6th 05 03:00 PM
Can I format to always AutoFilter specific cells BCantrell Excel Worksheet Functions 1 July 8th 05 11:50 PM
Selecting cells that contain text in a specific format nicad_adam Excel Discussion (Misc queries) 1 June 17th 05 05:19 AM
How do I format cells to a specific number of digits? Gabriele Excel Discussion (Misc queries) 3 February 5th 05 03:17 PM


All times are GMT +1. The time now is 11:49 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"