Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Complicated insert / drag formulas

Hello I have a format which is 7 columns and 59 rows long (column A is hidden
all the time so that makes 6 visible), what I need to edit is from row 19
on. So starting on Row 19 I have a couple of formulas in that row, those
formulas I drag them down with the following macro:

Option Explicit
Sub DragIndexVertical()
Dim LastRow As Long
With ActiveSheet
LastRow = .Range("B1").Value
Range("b19:f" & LastRow).FillDown
End With
End Sub

So what I need is to add lines to that code to add the following:

In this case the value in B1 gives me 4 more rows so this code generates
from Row 19 - 23.

Row24: I need to have a blank row
Row25: C25=Sheet1!G24, F25=Sheet1!H24
Row26: C26=Sheet1!G25, F26=Sheet1!H25
Row27: Blank row
Row28: C28=Sheet1!G27, F28=Sheet1!H27
Row29: Blank row
Row30: Blank row
Row31: "text written in here"
Row32 - 51: Blank rows

Note: this ahead I didn't come up with any better way to do it, any
suggestion is welcome!

Row52: "Sincerely" (Merge and Center B:F)
Row53: Blank row
Row54: "______________________" (Merge and Center B:F)
Row55: =Sheet2!B1 (Merge and Center B:F)
Row56 - 59: Blank rows

Ok so those are the 59 rows, the complicated thing in here is that in this
case the value of B1 on the code above adds me 4 extra rows with data but if
I would have had 15 for example, not everything would fit in the sheet of
paper. The "Sincerely" and all that afterwards would be left outside, it
would be REALLY nice if instead of adding Row 32-51 in blank by default, it
would add the result of substracting the resulting from the code above from
59, anyways maybe that is too much, at least with the above I would be happy
with the code, i don't mind adding / deleting rows at the end!

thanks for your time
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
Countif formulas change after doing a sort Bob Smith Excel Worksheet Functions 3 January 4th 06 12:17 AM
How can I insert a row and have the existing formulas apply? Charity Worker in Africa Excel Discussion (Misc queries) 6 October 6th 05 10:05 AM
How do I insert OR in imbedded formulas? bfd Excel Worksheet Functions 3 September 28th 05 09:59 PM
Formulas (If linked data is not null, then insert "Complete" in ce Task Lead Nicole Excel Worksheet Functions 3 January 10th 05 07:25 PM
calculating formulas for all workbooks in a folder Chad Excel Worksheet Functions 3 November 13th 04 06:22 PM


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