Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old April 28th 06, 10:26 PM posted to microsoft.public.excel.worksheet.functions
Dick B.
 
Posts: n/a
Default how to use a variable for the criteria in a sumif function?

I am trying to use a named variable for the criteria in a sumif function.
=sumif(A1:A4,"currentjobno",B1:B4)
currentjobno has a value of 38006

  #2   Report Post  
Old April 28th 06, 11:05 PM posted to microsoft.public.excel.worksheet.functions
Elkar
 
Posts: n/a
Default how to use a variable for the criteria in a sumif function?

Remove the quotes.

=sumif(A1:A4,currentjobno,B1:B4)

HTH,
Elkar


"Dick B." wrote:

I am trying to use a named variable for the criteria in a sumif function.
=sumif(A1:A4,"currentjobno",B1:B4)
currentjobno has a value of 38006

  #3   Report Post  
Old April 28th 06, 11:13 PM posted to microsoft.public.excel.worksheet.functions
Ian P
 
Posts: n/a
Default how to use a variable for the criteria in a sumif function?

I didn't think it was possible to define a variable in "just" Excel. I
thought this had to be do in VB. If I've got it wrong then how do you define
variables in Excel?

Thanks

Ian

"Elkar" wrote:

Remove the quotes.

=sumif(A1:A4,currentjobno,B1:B4)

HTH,
Elkar


"Dick B." wrote:

I am trying to use a named variable for the criteria in a sumif function.
=sumif(A1:A4,"currentjobno",B1:B4)
currentjobno has a value of 38006

  #4   Report Post  
Old April 28th 06, 11:29 PM posted to microsoft.public.excel.worksheet.functions
Elkar
 
Posts: n/a
Default how to use a variable for the criteria in a sumif function?

I'm assuming he's referring to a single cell as a named range, rather than a
variable. Although the effect is very similar.

"Ian P" wrote:

I didn't think it was possible to define a variable in "just" Excel. I
thought this had to be do in VB. If I've got it wrong then how do you define
variables in Excel?

Thanks

Ian

"Elkar" wrote:

Remove the quotes.

=sumif(A1:A4,currentjobno,B1:B4)

HTH,
Elkar


"Dick B." wrote:

I am trying to use a named variable for the criteria in a sumif function.
=sumif(A1:A4,"currentjobno",B1:B4)
currentjobno has a value of 38006

  #5   Report Post  
Old April 29th 06, 08:29 AM posted to microsoft.public.excel.worksheet.functions
Ian P
 
Posts: n/a
Default how to use a variable for the criteria in a sumif function?

Thanks, for a moment I thought a whole new area of Excel was going to open
up, much the same as when I first found out that it was possible to use VB in
worksheets.

Ian

"Elkar" wrote:

I'm assuming he's referring to a single cell as a named range, rather than a
variable. Although the effect is very similar.

"Ian P" wrote:

I didn't think it was possible to define a variable in "just" Excel. I
thought this had to be do in VB. If I've got it wrong then how do you define
variables in Excel?

Thanks

Ian

"Elkar" wrote:

Remove the quotes.

=sumif(A1:A4,currentjobno,B1:B4)

HTH,
Elkar


"Dick B." wrote:

I am trying to use a named variable for the criteria in a sumif function.
=sumif(A1:A4,"currentjobno",B1:B4)
currentjobno has a value of 38006



  #6   Report Post  
Old May 1st 06, 12:55 PM posted to microsoft.public.excel.worksheet.functions
Dick B.
 
Posts: n/a
Default how to use a variable for the criteria in a sumif function?

Thanks, Yes I have a single cell as a named range. It works great.
Thanks


"Ian P" wrote:

Thanks, for a moment I thought a whole new area of Excel was going to open
up, much the same as when I first found out that it was possible to use VB in
worksheets.

Ian

"Elkar" wrote:

I'm assuming he's referring to a single cell as a named range, rather than a
variable. Although the effect is very similar.

"Ian P" wrote:

I didn't think it was possible to define a variable in "just" Excel. I
thought this had to be do in VB. If I've got it wrong then how do you define
variables in Excel?

Thanks

Ian

"Elkar" wrote:

Remove the quotes.

=sumif(A1:A4,currentjobno,B1:B4)

HTH,
Elkar


"Dick B." wrote:

I am trying to use a named variable for the criteria in a sumif function.
=sumif(A1:A4,"currentjobno",B1:B4)
currentjobno has a value of 38006



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
How do I use the sumif if I have multiple criteria (i.e. greater . Kellyatisl Excel Worksheet Functions 3 June 4th 06 06:33 AM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
SUMIF function using Criteria on different worksheet Taxed Mind Excel Discussion (Misc queries) 2 April 14th 06 02:04 PM
Using ADD function within DCOUNT criteria DaveF2002 Excel Discussion (Misc queries) 4 June 19th 05 09:48 PM
Can I use a cell reference in the criteria for the sumif function. Number Cruncher Excel Worksheet Functions 2 November 4th 04 07:52 PM


All times are GMT +1. The time now is 04:47 AM.

Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2004-2017 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017