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: 36
Default Evaluate using a variable - Help please

I am having some difficulty substituting a variable (LastPRow) in place of
the Number 20 in the code below.
I assumed that if I substituted " & LastPRow & " for 20 it would work
.... but it doesn't.
It returns Error 13, Type Mismatch

TIA for any help you can provide

vba code ..........

With Sheets("Payments")
LastPRow = .Cells(65536, 1).End(xlUp).Row
TextBox11 = Format(Evaluate("SUM(IF(((A2:A20)=""" &
ComboBox2.Value & """)*((B2:B20)=" & CDbl(TextBox4.Text) & "),D1:D10))"),
"#,###.00")
End With



 
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
evaluate afdmello Excel Worksheet Functions 3 May 16th 10 09:11 PM
Evaluate function Stefi Excel Worksheet Functions 7 November 21st 07 12:50 PM
What is evaluate formula? Rasoul Khoshravan Excel Worksheet Functions 11 October 27th 06 01:52 PM
HOW to Evaluate a range with IF ? dancab Excel Discussion (Misc queries) 3 September 1st 05 05:08 PM
Evaluate formula using VBA Ali Baba Excel Discussion (Misc queries) 0 August 17th 05 12:31 AM


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