Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Fill in Formulas

In Excel2000, I have the following formulas:

A B c
1
2 +B2
3 +C2
4
5
6
7

I want to create a macro to select a range (say A4:A20) that will look
at the previous row's formula and add one column to column reference.
My output will then look like:

A B c
1
2 +B2
3 +C2
4 +D2
5 +E2
6 +F2
7 +G2
etc, etc.

Any ideas?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Fill in Formulas

for each cell in selection
cell.formula = "+" & cells(2,cell.row).Address(0,0)
Next

--
Regards,
Tom Ogilvy

"snax500" wrote in message
oups.com...
In Excel2000, I have the following formulas:

A B c
1
2 +B2
3 +C2
4
5
6
7

I want to create a macro to select a range (say A4:A20) that will look
at the previous row's formula and add one column to column reference.
My output will then look like:

A B c
1
2 +B2
3 +C2
4 +D2
5 +E2
6 +F2
7 +G2
etc, etc.

Any ideas?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Fill in Formulas

Why use a macro

in A2, use

=INDEX($2:$2,1,ROW())

and copy down

--

HTH

RP
(remove nothere from the email address if mailing direct)


"snax500" wrote in message
oups.com...
In Excel2000, I have the following formulas:

A B c
1
2 +B2
3 +C2
4
5
6
7

I want to create a macro to select a range (say A4:A20) that will look
at the previous row's formula and add one column to column reference.
My output will then look like:

A B c
1
2 +B2
3 +C2
4 +D2
5 +E2
6 +F2
7 +G2
etc, etc.

Any ideas?

Thanks



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
Formulas - Countif and Fill Down Joey Excel Discussion (Misc queries) 2 March 20th 08 03:10 PM
Fill Down Formulas Baffled Excel Worksheet Functions 0 January 26th 08 12:01 AM
automatic fill formulas down Dreamstar_1961 Excel Worksheet Functions 2 April 19th 07 02:13 PM
Fill formulas Rob Excel Discussion (Misc queries) 2 February 7th 07 03:30 PM
Some formulas don't track copies, pastes, fill right, fill down whiten Excel Discussion (Misc queries) 2 October 1st 06 04:41 PM


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