LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default excel 97 : automatically inserting a specific value for a range?

hello,

okay, i have written a macro that will add new worksheets within the
workbook and then copy and paste data from worksheet1 to worksheet2.
is it possible to insert data in a range("A1") what will remain a
constant? for example, all i care about copying ranges C and E from
sheet1("FTREGIFUNDSMOVE") and pasting them to
sheet2("SEIACHDisbursement") in the specified ranges. This works
great. However, in range A, it needs to be 43700410 and range D will
be 220. Is there a way that I can write this information by a macro
instead of going to the worksheet and copy and paste it myself by
dragging arrow down? any suggestions would be appreciated or if i
just need to start over again.

thanks jung

here is the macro(s).
Sub FundsMovementSEIDriver()

'This macro is for the SEI ACH Disbursements for the FundsMovementSEI
Driver
Application.ScreenUpdating = False


ActiveSheet.Name = "SEIACHDisbursement"
Range("A1").Value = "FromAcct" 'will always be 47300410 -how can i
copy and paste to this worksheet?
Range("B1").Value = "FromIncome" 'blank
Range("C1").Value = "FromPrincipal"
Range("D1").Value = "DisbursementCode" 'will always be 220 for
disbursements
Range("E1").Value = "DisbursementExplanation1" '="INT" & [DUEDATE] &
"371"
Range("F1").Value = "DisbursementExplanation2" 'blank
Range("G1").Value = "DisbursementExplanation3" 'blank
Range("H1").Value = "DisbursementExplanation4" 'blank
Range("I1").Value = "DisbursementExplanation5" 'blank
Range("J1").Value = "Taxid" 'specific to the database
Range("K1").Value = "ToENeeded" 'blank
Range("L1").Value = "CUSIP" 'blank


'copy and paste specific cells from ftregi_funds_move worksheet
'SEIACHDisbursements have only the subtotal of each Due Date
'Find Range("A1") = Subtotal and paste to FromPrincipal column

Worksheets("FTREGIFUNDSMOVE").Range("E2:E100").Cop y _
Destination:=Worksheets("SEIACHDisbursement").Rang e("C2:C100")

Worksheets("FTREGIFUNDSMOVE").Range("B2:B100").Cop y _
Destination:=Worksheets("SEIACHDisbursement").Rang e("E2:E100")

'Fill in Range("E1") as (="INT" & [DUEDATE] & "371")

Application.ScreenUpdating = True

End Sub


Sub AddNewWorksheets()

Worksheets.Add
Sheets.Add.Name = "SEITransfer"
Sheets.Add.Name = "SEIWire"
Sheets.Add.Name = "SEIACHReceipt"
Sheets.Add.Name = "SEIACHDisbursement"

'Deletes other worksheets
Application.DisplayAlerts = False
Sheets("Sheet1").Delete
Application.DisplayAlerts = True

'Application.DisplayAlerts = False
'Sheets("Sheet6").Delete
'Application.DisplayAlerts = True

End Sub

Sub DeleteRows()

Application.ScreenUpdating = False

Dim MaxRow As Long
Dim i As Long

MaxRow = Range("D65536").End(xlUp).Row

For i = MaxRow To 1 Step -1

valcel = Range("D" & i).Value

If valcel < " SUTOTAL" And valcel < "0" Then
Range("D" & i).EntireRow.Delete
End If
Next 'i

Application.StatusBar = False
Application.ScreenUpdating = True

End Sub
 
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
Automatically open a specific spreadsheet when opening Excel Carlos Setting up and Configuration of Excel 2 December 1st 09 08:06 PM
Inserting data into Word document by a range of dates from Excel spreadsheet Gordon[_6_] New Users to Excel 3 July 29th 08 08:22 PM
automatically open a specific worksheet when starting excel 2007 George3_1949 Excel Discussion (Misc queries) 1 November 9th 07 03:51 PM
How can I find and format specific cells automatically in Excel? Amy Excel Worksheet Functions 1 August 6th 05 03:00 PM
inserting specific # of rows cwinters Excel Discussion (Misc queries) 1 June 6th 05 07:30 PM


All times are GMT +1. The time now is 10:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"