Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
unixbeard
Dec 29, 2004

i manually enter a bunch of date, number values across 2 colums, e.g.

3/1/2010 | 3
2/1/2010 | 7
1/1/2010 | 1

then on the 4th it becomes

4/1/2010 | 2
3/1/2010 | 3
2/1/2010 | 7
1/1/2010 | 1

in another cell i have say the sum of the top 3 rows in the value column. When its the next day and i insert a new date, value observation, i cut the existing data and paste it one row down, then insert the new data above it. As expected Excel tracks all the cell refs, so what was SUM(B5:B7) becomes SUM(B6:B8) and the new value gets ignored.

How do i either make excel always use the values in B5:B7 even if data gets moved around, or is there some other way I could do it? I guess I could always write a macro that looks for the first number in column B then returns the range from that number + 3, but it seems like this is something excel might already deal with.

Adbot
ADBOT LOVES YOU

unixbeard
Dec 29, 2004

esquilax posted:

=sum(indirect("B5:B7")) treats "B5:B7" as text, so it will always use that range and keep it from updating.

oh beautiful, thanks.

unixbeard
Dec 29, 2004

Is there a way i can generate a fixed content range? I have a series of observations from a time series and want to call SLOPE() on them. The observations are the y-vals for SLOPE(), and for the x vals i just want 1,2,3,4 ... 20. Is there anything like range()/xrange() in python?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply