PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?RGljayBCLg==?=
Guest
Posts: n/a
 
      28th Apr 2006
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 With Quote
 
 
 
 
=?Utf-8?B?RWxrYXI=?=
Guest
Posts: n/a
 
      28th Apr 2006
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 With Quote
 
 
 
 
=?Utf-8?B?SWFuIFA=?=
Guest
Posts: n/a
 
      28th Apr 2006
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 With Quote
 
=?Utf-8?B?RWxrYXI=?=
Guest
Posts: n/a
 
      28th Apr 2006
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 With Quote
 
=?Utf-8?B?SWFuIFA=?=
Guest
Posts: n/a
 
      29th Apr 2006
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 With Quote
 
=?Utf-8?B?RGljayBCLg==?=
Guest
Posts: n/a
 
      1st May 2006
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sumif when criteria range is larger but includes criteria Joe1939 Microsoft Excel Programming 1 16th Jan 2009 08:41 PM
sumif when criteria range is larger but includes criteria Joe1939 Microsoft Excel Programming 1 16th Jan 2009 08:41 PM
Re: SUMIF/SUMPRODUCT Criteria are Variable Sized T. Valko Microsoft Excel Misc 2 19th May 2008 05:19 PM
SUMIF with 3 criteria vs 2 criteria jane Microsoft Excel Worksheet Functions 6 13th Feb 2008 04:55 PM
nested sumif or sumif with two criteria =?Utf-8?B?ZHNoaWdsZXk=?= Microsoft Excel Worksheet Functions 5 5th Apr 2005 03:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:04 PM.