Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Array Formula Using WorksheetFunction


Hi All,

I want to know how can i call a arrayformula using WorksheetFunction in
VBA
For eg :
I need to call "=COUNT(IF(Location="NY",IF(Headcount,1)))" as an array
formula using WorksheetFunction object
Is it possible ?

Thanks in advance
Xcelion


--
xcelion
------------------------------------------------------------------------
xcelion's Profile: http://www.excelforum.com/member.php...o&userid=16287
View this thread: http://www.excelforum.com/showthread...hreadid=485839

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Array Formula Using WorksheetFunction

Use Evaluate

Activesheet.Evaluate = "=COUNT(IF(Location=""NY"",IF(Headcount,1)))"

--

HTH

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


"xcelion" wrote in
message ...

Hi All,

I want to know how can i call a arrayformula using WorksheetFunction in
VBA
For eg :
I need to call "=COUNT(IF(Location="NY",IF(Headcount,1)))" as an array
formula using WorksheetFunction object
Is it possible ?

Thanks in advance
Xcelion


--
xcelion
------------------------------------------------------------------------
xcelion's Profile:

http://www.excelforum.com/member.php...o&userid=16287
View this thread: http://www.excelforum.com/showthread...hreadid=485839



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Array Formula Using WorksheetFunction


Hi Bob.

It's simply great.I was trying out for a solution in various ways.

Thanks Thanks alot
It's really new information for me
But one silly doubt :)
How did evaluate know it is a ArrayFormula ?.We are not specfying { or
any thing else to denote it's an array formula

Thanks
Xcelion


--
xcelion
------------------------------------------------------------------------
xcelion's Profile: http://www.excelforum.com/member.php...o&userid=16287
View this thread: http://www.excelforum.com/showthread...hreadid=485839

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Array Formula Using WorksheetFunction

That's a good question, and whilst I can't say that I know I could guess.

Excel obviously knows which function works on arrays, which on single cells.
Knowing that IF in itself works on a single cell, and that being used
against an array of cells, so it knows it must be an array formula.

Guess it is the same way that it often returns #VALUE if an array formula is
not array-entered in Excel itself.

--

HTH

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


"xcelion" wrote in
message ...

Hi Bob.

It's simply great.I was trying out for a solution in various ways.

Thanks Thanks alot
It's really new information for me
But one silly doubt :)
How did evaluate know it is a ArrayFormula ?.We are not specfying { or
any thing else to denote it's an array formula

Thanks
Xcelion


--
xcelion
------------------------------------------------------------------------
xcelion's Profile:

http://www.excelforum.com/member.php...o&userid=16287
View this thread: http://www.excelforum.com/showthread...hreadid=485839



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Array Formula Using WorksheetFunction


Hi Bob,

I am simply impressed by your answer.Thanks a lot.

Can you please advice so that i can also give superb answers like you

I really want to be a excel master like you.

What should i do ?

Thanks
Xcelion


--
xcelion
------------------------------------------------------------------------
xcelion's Profile: http://www.excelforum.com/member.php...o&userid=16287
View this thread: http://www.excelforum.com/showthread...hreadid=485839



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Array Formula Using WorksheetFunction

I guess the best way to learn is two fold, get out and about in your
community and offer your services. That way you get to see what people want
of computers, and help them deliver it, In addition, join forums like this,
watch the questions and answers, join in when you can with a solution, and
keep on learning.

--

HTH

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


"xcelion" wrote in
message ...

Hi Bob,

I am simply impressed by your answer.Thanks a lot.

Can you please advice so that i can also give superb answers like you

I really want to be a excel master like you.

What should i do ?

Thanks
Xcelion


--
xcelion
------------------------------------------------------------------------
xcelion's Profile:

http://www.excelforum.com/member.php...o&userid=16287
View this thread: http://www.excelforum.com/showthread...hreadid=485839



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
Array formula SUMIF with 2D sum_range array Rich_84 Excel Worksheet Functions 3 April 3rd 09 10:46 PM
Array formula: how to join 2 ranges together to form one array? Rich_84 Excel Worksheet Functions 2 April 1st 09 06:38 PM
Find specific value in array of array formula DzednConfsd Excel Worksheet Functions 2 January 13th 09 06:19 AM
Tricky array formula issue - Using array formula on one cell, then autofilling down a range aspenbordr Excel Programming 0 July 27th 05 03:59 PM
WorkSheetFunction.CountIf & WorkSheetFunction.SumIf with 2 conditions? Etien[_2_] Excel Programming 3 January 13th 04 04:07 PM


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