Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to fill formula in any cell and drag it?


hi everyone,

Please help me as following:
- i wanna use VBA to fill automatically a formula in any cell i don'
know before
- then, drag that cell to right 2 cells more
- after that, select 3 cells, drag all of them down to last row - 4
because amount of rows update frequently. last row of formula is las
row -4.

thanks in advance

--
vumia
-----------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...fo&userid=3649
View this thread: http://www.excelforum.com/showthread.php?threadid=57000

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default how to fill formula in any cell and drag it?

Did you try recoding a macro ?
I got this:

Range("C7").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=SUM(R[-4]C:R[-1]C)"
Range("C7").Select
Selection.AutoFill Destination:=Range("C7:E7"), Type:=xlFillDefault
Range("C7:E7").Select
Selection.AutoFill Destination:=Range("C7:E10"), Type:=xlFillDefault
Range("C7:E10").Select

NickHK

"vumian" wrote in
message ...

hi everyone,

Please help me as following:
- i wanna use VBA to fill automatically a formula in any cell i don't
know before
- then, drag that cell to right 2 cells more
- after that, select 3 cells, drag all of them down to last row - 4,
because amount of rows update frequently. last row of formula is last
row -4.

thanks in advance.


--
vumian
------------------------------------------------------------------------
vumian's Profile:

http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=570009



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to fill formula in any cell and drag it?


hi man,

thanks for your help, but

i mean, i drag down to last rows-4. it does not mean to drag down
row

thanks for help one more

--
vumia
-----------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...fo&userid=3649
View this thread: http://www.excelforum.com/showthread.php?threadid=57000

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
Fill & Drag to Right !! HELP ! Jez[_2_] Excel Discussion (Misc queries) 2 September 17th 09 03:12 PM
fill handle and cell drag-and-drop jfh14 Excel Discussion (Misc queries) 1 October 8th 08 08:24 PM
Fill Handle doesn't display - Allow cell drag and Drop option is c Joey Excel Discussion (Misc queries) 1 April 9th 08 09:29 PM
Drag to fill a formula - problem! Annie1904 Excel Worksheet Functions 2 April 25th 07 03:36 PM
How to avoid black shade fill on the from cell,when drag-and-drop Salesi Fono New Users to Excel 0 June 9th 06 08:12 PM


All times are GMT +1. The time now is 04:57 AM.

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"