Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Len Len is offline
external usenet poster
 
Posts: 162
Default Dynamic Named Range

Hi,

In excel vba, how to set dynamic named range so that it can use in
sumif excel formula

E.g.

=SUMIF(Acct, "Total*", xxx)-SUMIF(Acct, "Expenses*",yyy)*-2

Acct refer to named range in column A
xxx refer to dynamic named range in column C
yyy refer to dynamic named range in column D

Can anyone help and thanks in advance

Regards
Len
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,480
Default Dynamic Named Range

Hi Len

If Acct has been defined and is in column A, then range for column C would
be
Offset(Acct, 0, 2)
and for column D would be
Offset(Acct, 0, 3)

SUMIF(Acct, "Total*", Offset(Acct, 0, 2))-SUMIF(Acct,
"Expenses*",Offset(Acct, 0, 3))*-2

--
Regards
Roger Govier

"Len" wrote in message
...
Hi,

In excel vba, how to set dynamic named range so that it can use in
sumif excel formula

E.g.

=SUMIF(Acct, "Total*", xxx)-SUMIF(Acct, "Expenses*",yyy)*-2

Acct refer to named range in column A
xxx refer to dynamic named range in column C
yyy refer to dynamic named range in column D

Can anyone help and thanks in advance

Regards
Len

__________ Information from ESET Smart Security, version of virus
signature database 4833 (20100203) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 4833 (20100203) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default Dynamic Named Range

LastRow = Cells(Rows.Count, "A")End(xlUp).Row

Range(Range("A2"), Cells(LastRow, "A")).Name = "Acct"

HTH

Bob

"Len" wrote in message
...
Hi,

In excel vba, how to set dynamic named range so that it can use in
sumif excel formula

E.g.

=SUMIF(Acct, "Total*", xxx)-SUMIF(Acct, "Expenses*",yyy)*-2

Acct refer to named range in column A
xxx refer to dynamic named range in column C
yyy refer to dynamic named range in column D

Can anyone help and thanks in advance

Regards
Len



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default Dynamic Named Range

That should be a dot (.)

Bob

"Bob Phillips" wrote in message
...
LastRow = Cells(Rows.Count, "A")End(xlUp).Row

Range(Range("A2"), Cells(LastRow, "A")).Name = "Acct"

HTH

Bob

"Len" wrote in message
...
Hi,

In excel vba, how to set dynamic named range so that it can use in
sumif excel formula

E.g.

=SUMIF(Acct, "Total*", xxx)-SUMIF(Acct, "Expenses*",yyy)*-2

Acct refer to named range in column A
xxx refer to dynamic named range in column C
yyy refer to dynamic named range in column D

Can anyone help and thanks in advance

Regards
Len





  #5   Report Post  
Posted to microsoft.public.excel.programming
Len Len is offline
external usenet poster
 
Posts: 162
Default Dynamic Named Range

Hi Roger, Bob

Thanks a lot your formula and both work great!.......



Best Regards
Len


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
dynamic named range Gadeyne Dries New Users to Excel 3 April 4th 10 05:28 AM
Dynamic Named Range dhstein Excel Discussion (Misc queries) 4 October 11th 09 11:15 PM
Dynamic Named Range [email protected] Excel Discussion (Misc queries) 0 November 20th 07 03:08 PM
Dynamic Named Range bountifulgrace Charts and Charting in Excel 1 April 6th 06 08:39 PM
getting the absolute range address from a dynamic named range junoon Excel Programming 2 March 21st 06 01:29 PM


All times are GMT +1. The time now is 02:54 PM.

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"