Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Named Range Formula

Glad you got it working.

C Brehm wrote:

"Dave Peterson" wrote in message
...
This array formula:

{=SUM(IF(MONTH(A4:A358)=MONTH(TODAY())-1,E4:F358))}
doesn't have to be placed into a name to be plopped into a cell.
And the formula that you have in your code doesn't look like the
equivalent of
this formula.


I know it does not look the same, but does the same job for the last month
in another workbook. I used it to help figure out what I wanted to do.

And when you use:
...worksheets(shname).range("C2:" & rc & ")...
that rc variable is just a number.

It would be like using C2:1234

You would want some letter in that second portion of the address:
C2:C1234


Beats head on keyboard. No wonder I never could get anything to work.

And when you have a number between 1-12, it already represents a valid
month
number.

=month(somenumberbetween1and12)
will always return 1
1 is the same as Jan 1, 1900
2 is the same as Jan 2, 1900
...
12 is the same as Jan 12, 1900

All those dates are in January (or 1).

And I'm guessing that you don't want to subtract 1 from that month number
like
in your worksheet formula sample.


I did in the other workbook but not here.

With Array formulas, you don't enter the {}'s yourself--either manually or
in
code. Manually, you'd use ctrl-shift-enter. In code, you'd use
.formulaarray.


Thanks, did not know that, but would siplify things a lot. I am trying to
self teach myself, but sometimes my head is just to plain thick.

I'm not sure if this does what you want, but it may give you some ideas:


Thank you, Was a great help and pointed me in a new direction that will be a
lot simpler.


--

Dave Peterson
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
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
Formula for named range TUNGANA KURMA RAJU Excel Discussion (Misc queries) 2 July 1st 06 05:41 AM
named range into formula? heymoa Excel Worksheet Functions 4 May 22nd 06 02:05 PM
Named Range is a formula cogent Excel Programming 3 June 2nd 04 09:48 AM
using a Named Range (formula) in a UDF Sean Maguire Excel Programming 1 May 25th 04 08:27 PM


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

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

About Us

"It's about Microsoft Excel"