If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 how to use a variable for the criteria in a sumif function?
 Author Name Remember Me? Password
 Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

## how to use a variable for the criteria in a sumif function?

 Thread Tools Display Modes
#1
April 28th 06, 10:26 PM posted to microsoft.public.excel.worksheet.functions
 Dick B. external usenet poster Posts: n/a
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
 Ads
#2
April 28th 06, 11:05 PM posted to microsoft.public.excel.worksheet.functions
 Elkar external usenet poster Posts: n/a
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
April 28th 06, 11:13 PM posted to microsoft.public.excel.worksheet.functions
 Ian P external usenet poster Posts: n/a
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
April 28th 06, 11:29 PM posted to microsoft.public.excel.worksheet.functions
 Elkar external usenet poster Posts: n/a
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
April 29th 06, 08:29 AM posted to microsoft.public.excel.worksheet.functions
 Ian P external usenet poster Posts: n/a
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
May 1st 06, 12:55 PM posted to microsoft.public.excel.worksheet.functions
 Dick B. external usenet poster Posts: n/a
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

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Excel Newsgroups     Excel Discussion (Misc queries)     Setting up and Configuration of Excel     New Users to Excel     Excel Worksheet Functions     Links and Linking in Excel     Charts and Charting in Excel     Excel Programming About ExcelBanter     About this forum

 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 11:25 AM.

 - Contact Us - ExcelBanter forum home - FAQ - Links - Privacy Statement - Top

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