Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help Please - CountIf and Array formula

I'm struggling to get to grips with array formula and don't have much time
left and so I am asking for your help to programatically enter a fomula that
will count
the cells in Range(A2:A500) that contain String_A whose corresponding cell
in Range(N2:N500) contains String_B

My grateful thanks in advance for any help





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Help Please - CountIf and Array formula

i believe this will do want you need,

=SUMPRODUCT((A2:A500="string_a")*(n2:n500="string_ 2"))

--


Gary


"Prickle" <prick@somewherecom wrote in message
...
I'm struggling to get to grips with array formula and don't have much time
left and so I am asking for your help to programatically enter a fomula that
will count
the cells in Range(A2:A500) that contain String_A whose corresponding cell
in Range(N2:N500) contains String_B

My grateful thanks in advance for any help







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help Please - CountIf and Array formula

Thanks to you both - works a treat

"Prickle" <prick@somewherecom wrote in message
...
I'm struggling to get to grips with array formula and don't have much time
left and so I am asking for your help to programatically enter a fomula
that will count
the cells in Range(A2:A500) that contain String_A whose corresponding cell
in Range(N2:N500) contains String_B

My grateful thanks in advance for any help







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help Please - CountIf and Array formula

If String_A and String_B are litterals that you are looking for

s = "=Sumproduct(--(A2:A500=""String_A""),--(N2:N500=""String_B""))
ActiveCell.Formula = s

if these are variables that contain string litterals

String_A = "a23rt"
String_B = "Johnson"
s = "=Sumproduct(--(A2:A500=""String_A""),--(N2:N500=""String_B""))
s = replace(s,"String_A",String_A)
s = replace(s,"String_B",String_B)
ActiveCell.Formula = s

--
Regards,
Tom Ogilvy


"Prickle" <prick@somewherecom wrote in message
...
I'm struggling to get to grips with array formula and don't have much time
left and so I am asking for your help to programatically enter a fomula

that
will count
the cells in Range(A2:A500) that contain String_A whose corresponding cell
in Range(N2:N500) contains String_B

My grateful thanks in advance for any help









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help Please - CountIf and Array formula

Don probably meant:

range("a1").formula= _
"=SUMPRODUCT((A2:A500=""string_a"")*(n2:n500=""str ing_2""))"

--
Regards,
Tom Ogilvy


"Don Guillett" wrote in message
...
range("a1").formula=
"=SUMPRODUCT((A2:A500="string_a")*(n2:n500="string _2"))"


--
Don Guillett
SalesAid Software

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i believe this will do want you need,

=SUMPRODUCT((A2:A500="string_a")*(n2:n500="string_ 2"))

--


Gary


"Prickle" <prick@somewherecom wrote in message
...
I'm struggling to get to grips with array formula and don't have much
time
left and so I am asking for your help to programatically enter a fomula
that will count
the cells in Range(A2:A500) that contain String_A whose corresponding
cell
in Range(N2:N500) contains String_B

My grateful thanks in advance for any help











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
Countif array formula David Excel Worksheet Functions 7 October 17th 06 04:29 PM
Array formula using two columns and countif Dave Excel Worksheet Functions 8 May 12th 06 07:02 PM
I need to create an array formula combined with a countif Rochelle B Excel Worksheet Functions 5 October 25th 05 05:12 AM
Countif array formula Bruce Excel Worksheet Functions 1 October 14th 05 08:46 AM
countif array formula Rita Excel Worksheet Functions 3 December 15th 04 04:44 AM


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