LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default VBA Sum Product

G'day everbody Help!
A B C D E
3A 4E 5A 6D Answer 18

On this row the procedure below works a treat,what I am trying for is to Sum
only the cells with "a" in mid(myrange1,2,1) Answer 8.Have tried a multitude
of different formulas but alas I admit defeat. Our dog will be gratefull for
any help as he cops my bad mood when it does not work. Regards John

Private Sub UserForm_Activate()
Dim myrange1 As Range
Dim a As Variant
Set myrange1 = Range(Selection.EntireRow.Cells(1, 4), Selection)
a = Evaluate("sumproduct(--left(0&" & myrange1.Address & ",2))")
msgbox a
end sub

 
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
Product Code and Product Description setup Nastyashman Excel Worksheet Functions 4 July 6th 09 05:48 PM
I need a product key for my Trail product, 2007 Microsoft Office s sltchsyi Setting up and Configuration of Excel 0 May 4th 09 01:32 AM
Sum Product flds New Users to Excel 2 June 20th 08 08:22 PM
Convert numbers to text (from product id # to name of product) [email protected] Excel Programming 1 September 12th 07 09:58 PM
Vlookup code product and to copy commentary with photo of the product in vba [email protected] Excel Programming 0 October 2nd 06 03:54 AM


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

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

About Us

"It's about Microsoft Excel"