ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula to Excel VB (https://www.excelbanter.com/excel-programming/365990-formula-excel-vbulletin.html)

JAVB[_2_]

Formula to Excel VB
 

Is there a way to code the following formula idea to pull from an Excel
VB array?
{=SUM((Market="USA")*(Customer_Name="ExcelTip"))}

I have an array with multiple report names and multiple dates I nee
to be able to tell how many times a given report appeared on a give
date.
A date may have (multiple reports or the same report multiple times
and a report many have multiple dates.

Any help would be greatly appreciated

--
JAV
-----------------------------------------------------------------------
JAVB's Profile: http://www.excelforum.com/member.php...fo&userid=2930
View this thread: http://www.excelforum.com/showthread.php?threadid=55743


JMB

Formula to Excel VB
 
Maybe

Sub test()
Dim lngResult As Long

lngResult = CLng(Evaluate("=SUMPRODUCT(--(" & _
Range("Market").Address(True, True, xlA1, True) & _
"=""USA""), --(" & _
Range("Customer_Name").Address(True, True, xlA1, True) & _
"=""ExcelTip""))"))

MsgBox lngResult

End Sub

"JAVB" wrote:


Is there a way to code the following formula idea to pull from an Excell
VB array?
{=SUM((Market="USA")*(Customer_Name="ExcelTip"))}

I have an array with multiple report names and multiple dates I need
to be able to tell how many times a given report appeared on a given
date.
A date may have (multiple reports or the same report multiple times)
and a report many have multiple dates.

Any help would be greatly appreciated.


--
JAVB
------------------------------------------------------------------------
JAVB's Profile: http://www.excelforum.com/member.php...o&userid=29304
View this thread: http://www.excelforum.com/showthread...hreadid=557434




All times are GMT +1. The time now is 12:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com