Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default Reference an Operator from a cell with Sumproduct

I am trying to reference a cell which one could key in the operator i.e. = or
or < or = etc....


I want my sumproduct formula to reference this cell and use the operator
instead of hardcoding the symbol inside. Essentially I want to let the user
choose the operator within the sumproduct formula.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Reference an Operator from a cell with Sumproduct

Something like this (placed in E1, perhaps) may work for you:
=SUMPRODUCT(--(A1:A5=D1), --(B1:B5=10),--(C1:C5))

Also, this is a great resource for things pertaining to SUMPRODUCT:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Regards,
Ryan--

--
RyGuy


"deeds" wrote:

I am trying to reference a cell which one could key in the operator i.e. = or
or < or = etc....


I want my sumproduct formula to reference this cell and use the operator
instead of hardcoding the symbol inside. Essentially I want to let the user
choose the operator within the sumproduct formula.

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default Reference an Operator from a cell with Sumproduct

However, I need the = sign in a different cell that the sumproduct
references. So, the end user can change the = to or < or = etc. I need a
cell where they can change the operator and have it pull into the sumproduct
formula. Thanks again.

"ryguy7272" wrote:

Something like this (placed in E1, perhaps) may work for you:
=SUMPRODUCT(--(A1:A5=D1), --(B1:B5=10),--(C1:C5))

Also, this is a great resource for things pertaining to SUMPRODUCT:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Regards,
Ryan--

--
RyGuy


"deeds" wrote:

I am trying to reference a cell which one could key in the operator i.e. = or
or < or = etc....


I want my sumproduct formula to reference this cell and use the operator
instead of hardcoding the symbol inside. Essentially I want to let the user
choose the operator within the sumproduct formula.

Thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default Reference an Operator from a cell with Sumproduct

On Apr 23, 8:02 am, deeds wrote:
However, I need the = sign in a different cell that the sumproduct
references. So, the end user can change the = to or < or = etc. I need a
cell where they can change the operator and have it pull into the sumproduct
formula. Thanks again.

"ryguy7272" wrote:
Something like this (placed in E1, perhaps) may work for you:
=SUMPRODUCT(--(A1:A5=D1), --(B1:B5=10),--(C1:C5))


Also, this is a great resource for things pertaining to SUMPRODUCT:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html


Regards,
Ryan--


--
RyGuy


"deeds" wrote:


I am trying to reference a cell which one could key in the operator i.e. = or
or < or = etc....


I want my sumproduct formula to reference this cell and use the operator
instead of hardcoding the symbol inside. Essentially I want to let the user
choose the operator within the sumproduct formula.


Thanks in advance.


How many possible operators? You could just do a long series of IF
statements based on the contents of that cell if it isn't too many.
Perhaps use data validation on that cell to make it work properly.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 113
Default Reference an Operator from a cell with Sumproduct

Thanks! I ended up using if statements, it does get to be a cumbersome
formula. I really wish there were some way to have a user enter the operator
and have that cell be referenced from within sumproduct formula. Anwyways,
thanks for the help!

"Spiky" wrote:

On Apr 23, 8:02 am, deeds wrote:
However, I need the = sign in a different cell that the sumproduct
references. So, the end user can change the = to or < or = etc. I need a
cell where they can change the operator and have it pull into the sumproduct
formula. Thanks again.

"ryguy7272" wrote:
Something like this (placed in E1, perhaps) may work for you:
=SUMPRODUCT(--(A1:A5=D1), --(B1:B5=10),--(C1:C5))


Also, this is a great resource for things pertaining to SUMPRODUCT:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html


Regards,
Ryan--


--
RyGuy


"deeds" wrote:


I am trying to reference a cell which one could key in the operator i.e. = or
or < or = etc....


I want my sumproduct formula to reference this cell and use the operator
instead of hardcoding the symbol inside. Essentially I want to let the user
choose the operator within the sumproduct formula.


Thanks in advance.


How many possible operators? You could just do a long series of IF
statements based on the contents of that cell if it isn't too many.
Perhaps use data validation on that cell to make it work properly.

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
sumproduct - cell reference eugene Excel Worksheet Functions 4 February 28th 08 01:13 PM
Why doesnt union reference operator work with COUNTIF? joeu2004 Excel Discussion (Misc queries) 1 September 15th 07 09:59 AM
How to use a cell value as operator in a worksheet reference? JRP2003 Excel Worksheet Functions 2 August 14th 06 06:24 PM
SUMPRODUCT and OR operator Madiya Excel Worksheet Functions 5 July 10th 06 03:26 PM
SUMPRODUCT Criteria Via Cell Reference?? John V Excel Worksheet Functions 8 April 12th 06 07:55 PM


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