Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 168
Default How do I assign "Apple" to a cell reference in this evaluate code?

Sub Cnt() correctly returns 16.
Sub Cnt1() either Msgbox line returns 0

Option Explicit

Sub Cnt()
MsgBox Evaluate("SUMIF(D2:D7,""Apple"",E2:E7)")
End Sub

Sub Cnt1()
Dim i As Variant
i = Range("F1").Value
'MsgBox Evaluate("SUMIF(D2:D7,""i"",E2:E7)")
MsgBox Evaluate("SUMIF(D2:D7,i,E2:E7)")
End Sub

Thanks,
Regards,
Howard
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
VBA Code to Use "Name" in a cell as a reference SeventhFloorProfessor Excel Programming 1 February 26th 09 06:25 PM
Alternatives To: FileSearch with TextOrProperty (Problem FindingPhrase Such As "An apple a day") ChristopherL Excel Programming 0 September 30th 08 09:18 PM
Alternatives To: FileSearch with TextOrProperty (Problem FindingPhrase Such As "An apple a day") ChristopherL Excel Programming 0 September 30th 08 09:14 PM
"Indirect" reference to a cell in a code: how to do it? bondcrash[_11_] Excel Programming 1 September 16th 05 04:48 PM
Excel VBA - go to worksheet "name" based on a cell reference ="Name" james007 Excel Programming 2 July 8th 04 11:04 PM


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