#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default SUNPRODUCT

I am using the code below to populate cell E20 on a sheet. It works fine
but I was wondering if there is a way to improve it.

[E20] =
[SUMPRODUCT((rng1=3)*(rng2={"Yes1","Yes2","Yes1^"," Yes2^","NI","NI^"})*IsBla
nk(rng3)*IsBlank(rng4)*IsBlank(rng5)*IsBlank(rng6) *IsBlank(rng7))]

rng3 to rng7 are adjacent columns.

Thanks in advance.

Gareth


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default SUNPRODUCT

What would you consider an improvement?

--
Regards,
Tom Ogilvy

Gareth wrote in message
...
I am using the code below to populate cell E20 on a sheet. It works fine
but I was wondering if there is a way to improve it.

[E20] =

[SUMPRODUCT((rng1=3)*(rng2={"Yes1","Yes2","Yes1^"," Yes2^","NI","NI^"})*IsBla
nk(rng3)*IsBlank(rng4)*IsBlank(rng5)*IsBlank(rng6) *IsBlank(rng7))]

rng3 to rng7 are adjacent columns.

Thanks in advance.

Gareth




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default SUNPRODUCT

shorter code and not so many named ranges...

can Excel look at rng3 - rng7 as one range??

"Tom Ogilvy" wrote in message
...
What would you consider an improvement?

--
Regards,
Tom Ogilvy

Gareth wrote in message
...
I am using the code below to populate cell E20 on a sheet. It works

fine
but I was wondering if there is a way to improve it.

[E20] =


[SUMPRODUCT((rng1=3)*(rng2={"Yes1","Yes2","Yes1^"," Yes2^","NI","NI^"})*IsBla
nk(rng3)*IsBlank(rng4)*IsBlank(rng5)*IsBlank(rng6) *IsBlank(rng7))]

rng3 to rng7 are adjacent columns.

Thanks in advance.

Gareth






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default SUNPRODUCT

I can't think of an easy way to get the same result using that approach. I
won't say there isn't a way, but I don't think it would make your formula
much smaller if there were.

--
Regards,
Tom Ogilvy

Gareth wrote in message
...
shorter code and not so many named ranges...

can Excel look at rng3 - rng7 as one range??

"Tom Ogilvy" wrote in message
...
What would you consider an improvement?

--
Regards,
Tom Ogilvy

Gareth wrote in message
...
I am using the code below to populate cell E20 on a sheet. It works

fine
but I was wondering if there is a way to improve it.

[E20] =



[SUMPRODUCT((rng1=3)*(rng2={"Yes1","Yes2","Yes1^"," Yes2^","NI","NI^"})*IsBla
nk(rng3)*IsBlank(rng4)*IsBlank(rng5)*IsBlank(rng6) *IsBlank(rng7))]

rng3 to rng7 are adjacent columns.

Thanks in advance.

Gareth








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default SUNPRODUCT

ta...

"Tom Ogilvy" wrote in message
...
I can't think of an easy way to get the same result using that approach.

I
won't say there isn't a way, but I don't think it would make your formula
much smaller if there were.

--
Regards,
Tom Ogilvy

Gareth wrote in message
...
shorter code and not so many named ranges...

can Excel look at rng3 - rng7 as one range??

"Tom Ogilvy" wrote in message
...
What would you consider an improvement?

--
Regards,
Tom Ogilvy

Gareth wrote in message
...
I am using the code below to populate cell E20 on a sheet. It works

fine
but I was wondering if there is a way to improve it.

[E20] =




[SUMPRODUCT((rng1=3)*(rng2={"Yes1","Yes2","Yes1^"," Yes2^","NI","NI^"})*IsBla
nk(rng3)*IsBlank(rng4)*IsBlank(rng5)*IsBlank(rng6) *IsBlank(rng7))]

rng3 to rng7 are adjacent columns.

Thanks in advance.

Gareth












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
SUNPRODUCT and COUNTIF JerryS Excel Worksheet Functions 2 June 6th 05 11:22 PM


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