Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Formula without cell address

Is is possible t write a formula that doesn't use a cell address but rather a
relative location ( I cant have a specific cell letter in the formula)

ex. a formula adds the two cells to the left of the cell with the formula

What I'm trying to do is add the formula to a query that gets pasted into
excel. Then i manually type a formula in the last column. I can't hard
code a cell reference because each month there is an extra column so the
formula gets moged over one column each month.
--
"Just because you don''t know how to do something doesn''t mean it can''t be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Formula without cell address

Use a formula like this, where K11 is the cell _with_ the formula

=OFFSET(K11,0,-2)+OFFSET(K11,0,-1)

which will return I11+J11
When you insert a column to the left of K11, the formula will become

=OFFSET(L11,0,-2+OFFSET(L11,0,-1)
and will return J11+K11

--
HTH,
Bernie
MS Excel MVP


"Billy Rogers" wrote in message
...
Is is possible t write a formula that doesn't use a cell address but rather a
relative location ( I cant have a specific cell letter in the formula)

ex. a formula adds the two cells to the left of the cell with the formula

What I'm trying to do is add the formula to a query that gets pasted into
excel. Then i manually type a formula in the last column. I can't hard
code a cell reference because each month there is an extra column so the
formula gets moged over one column each month.
--
"Just because you don''t know how to do something doesn''t mean it can''t be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Formula without cell address

Tools Options... General and check the R1C1 reference checkbox
then use:
=RC[-1]+RC[-2]
--
Gary''s Student - gsnu200786


"Billy Rogers" wrote:

Is is possible t write a formula that doesn't use a cell address but rather a
relative location ( I cant have a specific cell letter in the formula)

ex. a formula adds the two cells to the left of the cell with the formula

What I'm trying to do is add the formula to a query that gets pasted into
excel. Then i manually type a formula in the last column. I can't hard
code a cell reference because each month there is an extra column so the
formula gets moged over one column each month.
--
"Just because you don''t know how to do something doesn''t mean it can''t be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Formula without cell address

thanks for the help, but I can't have any absolute cell addressess since this
is going to be pasted into a different cell each month. (the data I need will
be positioned relatively to it though)

I need some other way of refering to the cell itself that the formula is in.
--
"Just because you don''t know how to do something doesn''t mean it can''t be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/


"Bernie Deitrick" wrote:

Use a formula like this, where K11 is the cell _with_ the formula

=OFFSET(K11,0,-2)+OFFSET(K11,0,-1)

which will return I11+J11
When you insert a column to the left of K11, the formula will become

=OFFSET(L11,0,-2+OFFSET(L11,0,-1)
and will return J11+K11

--
HTH,
Bernie
MS Excel MVP


"Billy Rogers" wrote in message
...
Is is possible t write a formula that doesn't use a cell address but rather a
relative location ( I cant have a specific cell letter in the formula)

ex. a formula adds the two cells to the left of the cell with the formula

What I'm trying to do is add the formula to a query that gets pasted into
excel. Then i manually type a formula in the last column. I can't hard
code a cell reference because each month there is an extra column so the
formula gets moged over one column each month.
--
"Just because you don''t know how to do something doesn''t mean it can''t be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Formula without cell address

I need somehting like this without having to change the settings. The
spreadsheet is created automatically and is filled with data from SQL Server.
--
"Just because you don''t know how to do something doesn''t mean it can''t be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/


"Gary''s Student" wrote:

Tools Options... General and check the R1C1 reference checkbox
then use:
=RC[-1]+RC[-2]
--
Gary''s Student - gsnu200786


"Billy Rogers" wrote:

Is is possible t write a formula that doesn't use a cell address but rather a
relative location ( I cant have a specific cell letter in the formula)

ex. a formula adds the two cells to the left of the cell with the formula

What I'm trying to do is add the formula to a query that gets pasted into
excel. Then i manually type a formula in the last column. I can't hard
code a cell reference because each month there is an extra column so the
formula gets moged over one column each month.
--
"Just because you don''t know how to do something doesn''t mean it can''t be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Formula without cell address

Billy,

This will work for any cell:
=INDEX($1:$65536,ROW(),COLUMN()-2)+INDEX($1:$65536,ROW(),COLUMN()-1)

HTH,
Bernie
MS Excel MVP

"Billy Rogers" wrote in message
...
thanks for the help, but I can't have any absolute cell addressess since
this
is going to be pasted into a different cell each month. (the data I need
will
be positioned relatively to it though)

I need some other way of refering to the cell itself that the formula is
in.
--
"Just because you don''t know how to do something doesn''t mean it can''t
be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/


"Bernie Deitrick" wrote:

Use a formula like this, where K11 is the cell _with_ the formula

=OFFSET(K11,0,-2)+OFFSET(K11,0,-1)

which will return I11+J11
When you insert a column to the left of K11, the formula will become

=OFFSET(L11,0,-2+OFFSET(L11,0,-1)
and will return J11+K11

--
HTH,
Bernie
MS Excel MVP


"Billy Rogers" wrote in message
...
Is is possible t write a formula that doesn't use a cell address but
rather a
relative location ( I cant have a specific cell letter in the formula)

ex. a formula adds the two cells to the left of the cell with the
formula

What I'm trying to do is add the formula to a query that gets pasted
into
excel. Then i manually type a formula in the last column. I can't
hard
code a cell reference because each month there is an extra column so
the
formula gets moged over one column each month.
--
"Just because you don''t know how to do something doesn''t mean it
can''t be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Formula without cell address

awesome! Thanks Bernie
--
"Just because you don''t know how to do something doesn''t mean it can''t be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/


"Bernie Deitrick" wrote:

Billy,

This will work for any cell:
=INDEX($1:$65536,ROW(),COLUMN()-2)+INDEX($1:$65536,ROW(),COLUMN()-1)

HTH,
Bernie
MS Excel MVP

"Billy Rogers" wrote in message
...
thanks for the help, but I can't have any absolute cell addressess since
this
is going to be pasted into a different cell each month. (the data I need
will
be positioned relatively to it though)

I need some other way of refering to the cell itself that the formula is
in.
--
"Just because you don''t know how to do something doesn''t mean it can''t
be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/


"Bernie Deitrick" wrote:

Use a formula like this, where K11 is the cell _with_ the formula

=OFFSET(K11,0,-2)+OFFSET(K11,0,-1)

which will return I11+J11
When you insert a column to the left of K11, the formula will become

=OFFSET(L11,0,-2+OFFSET(L11,0,-1)
and will return J11+K11

--
HTH,
Bernie
MS Excel MVP


"Billy Rogers" wrote in message
...
Is is possible t write a formula that doesn't use a cell address but
rather a
relative location ( I cant have a specific cell letter in the formula)

ex. a formula adds the two cells to the left of the cell with the
formula

What I'm trying to do is add the formula to a query that gets pasted
into
excel. Then i manually type a formula in the last column. I can't
hard
code a cell reference because each month there is an extra column so
the
formula gets moged over one column each month.
--
"Just because you don''t know how to do something doesn''t mean it
can''t be
done"

Billy Rogers

Currently Using SQL Server 2000, Office 2000 and Office 2003

http://thedataguru.blogspot.com/






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
Cell Address in Formula Laury Excel Discussion (Misc queries) 2 October 8th 07 06:23 PM
Use Cell Address Lookup in formula Hennie[_2_] Excel Worksheet Functions 1 March 2nd 07 12:23 AM
cell address from formula JohnJC Excel Discussion (Misc queries) 1 June 14th 06 12:11 PM
How do I use cell contents as an address in a formula tomeck Excel Worksheet Functions 1 December 20th 05 05:46 PM
how do I write a formula: if (cell address) is less than X add Y CTrophyMan Excel Discussion (Misc queries) 4 December 1st 05 06:17 PM


All times are GMT +1. The time now is 07:03 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"