Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am writing a macros program and am having trouble with a formula.
If I have a set of values in column A and would like to use those values in column B with a formula, is there a command that will fill column B with that formula? The number of data points I use is always different so I can not tell excel to fill column B up to row 60 because it is not always 60 points. I've tried this with no success..... Range(ActiveCell.End(x2Down)).Select |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try
cells(rows.count,activecell.column).end(xlup).row or specify the column lastrow=cells(rows.count,"a").end(xlup).row set NO need to select anything sub setformula() Set frng = Range("a8:a" & cells(rows.count,"a").End(xlUp).Row) With frng .Formula = "=a7+3 ' .Formula = .Value 'to erase the formulas and leave the values End With End Sub -- Don Guillett SalesAid Software "Steph" wrote in message ... I am writing a macros program and am having trouble with a formula. If I have a set of values in column A and would like to use those values in column B with a formula, is there a command that will fill column B with that formula? The number of data points I use is always different so I can not tell excel to fill column B up to row 60 because it is not always 60 points. I've tried this with no success..... Range(ActiveCell.End(x2Down)).Select |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() As a very inexperienced macro writer I am very confused. I have been teaching myself macros from a book. Maybe you can be more specific if I am more specific.... The formula I am using is as follows: "(RC[-1]-Sheet2!R2C11)*86400" I am converting time in my data. My data is in column k. I wish to do the convesion in column L. Thanks for all the help! "Don Guillett" wrote: try cells(rows.count,activecell.column).end(xlup).row or specify the column lastrow=cells(rows.count,"a").end(xlup).row set NO need to select anything sub setformula() Set frng = Range("a8:a" & cells(rows.count,"a").End(xlUp).Row) With frng .Formula = "=a7+3 ' .Formula = .Value 'to erase the formulas and leave the values End With End Sub -- Don Guillett SalesAid Software "Steph" wrote in message ... I am writing a macros program and am having trouble with a formula. If I have a set of values in column A and would like to use those values in column B with a formula, is there a command that will fill column B with that formula? The number of data points I use is always different so I can not tell excel to fill column B up to row 60 because it is not always 60 points. I've tried this with no success..... Range(ActiveCell.End(x2Down)).Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel crashes while opening excel file imbeddied with macros | Excel Discussion (Misc queries) | |||
macros on one page | Excel Discussion (Misc queries) | |||
Enabling macros | Excel Discussion (Misc queries) | |||
Transferring toolbars and macros to other computers | Excel Discussion (Misc queries) | |||
The available macros list in XL; how to suppress filename from showing | Excel Discussion (Misc queries) |