Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default assigning a formule to each cel in a column

hello,

I have a problem, i want to assign every cell from 1 to 200 from a
certain column with a formule that calculates one cel minus another.
E.G.

cel f2 contains 20
cel g2 contains 34
cel h2 must than contain a formula =sum(f2-g2)
The formula self is not difficult using the macro recorder, but i want
to use one formula for an entire column

Regards,
Niek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default assigning a formule to each cel in a column

This will copy 'Your Formula' down from H2 to where the last number is in
column G.

Range("H2").Select
ActiveCell.FormulaR1C1 = "Your Formula"
Range("H2", Range("G2").End(xlDown)).Offset(0, 1).FillDown

Mike




"solo_razor" wrote in message
...
hello,

I have a problem, i want to assign every cell from 1 to 200 from a
certain column with a formule that calculates one cel minus another.
E.G.

cel f2 contains 20
cel g2 contains 34
cel h2 must than contain a formula =sum(f2-g2)
The formula self is not difficult using the macro recorder, but i want
to use one formula for an entire column

Regards,
Niek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default assigning a formule to each cel in a column

Another approach:

Set rng = Range(Cells(2,6),Cells(rows.count,6).End(xlup))
rng.offset(0,2).Formula = "=F2-G2"

Using sum is redundant.

--
Regards,
Tom Ogilvy

"solo_razor" wrote in message
...
hello,

I have a problem, i want to assign every cell from 1 to 200 from a
certain column with a formule that calculates one cel minus another.
E.G.

cel f2 contains 20
cel g2 contains 34
cel h2 must than contain a formula =sum(f2-g2)
The formula self is not difficult using the macro recorder, but i want
to use one formula for an entire column

Regards,
Niek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.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
Assigning a single value to a column Peekaboo012885 Excel Discussion (Misc queries) 3 March 11th 09 09:18 PM
time formule arslan Excel Discussion (Misc queries) 0 April 15th 06 12:21 PM
assigning value to a column based on a table of values Jacob Excel Discussion (Misc queries) 3 January 13th 06 08:46 PM
HOW to show in A2 the formule used in A1 ? Thierry Fracheboud Excel Programming 1 October 13th 03 12:00 AM
Help please assigning column and rows HS[_3_] Excel Programming 0 October 6th 03 10:07 PM


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