Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Help to write a macro.....

Hi All,
I have 2 excel workbook Register.xls & Update.xls my query is every day i
enter the data in Register.xls as follows

SlNo Module Submodule Date Type Status
1 Mfg FAS 01/02/07 Enh Out
2 Dis Aviance 10/02/07 Enh out
3 Mfg FAS 10/02/07 Enh In
4 Fin SEGA 11/01/07 Bug In

now i want to copy the row to Update.xls where the Status is "OUT" can any
one help me to write a macro for this

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help to write a macro.....

check out the code samples he

http://www.rondebruin.nl/copy5.htm

--
Regards,
Tom Ogilvy


"kiran" wrote in message
...
Hi All,
I have 2 excel workbook Register.xls & Update.xls my query is every day i
enter the data in Register.xls as follows

SlNo Module Submodule Date Type Status
1 Mfg FAS 01/02/07 Enh Out
2 Dis Aviance 10/02/07 Enh out
3 Mfg FAS 10/02/07 Enh In
4 Fin SEGA 11/01/07 Bug In

now i want to copy the row to Update.xls where the Status is "OUT" can any
one help me to write a macro for this

TIA



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help to write a macro.....

On Feb 10, 11:44 pm, kiran wrote:
Hi All,
I have 2 excel workbook Register.xls & Update.xls my query is every day i
enter the data in Register.xls as follows

SlNo Module Submodule Date Type Status
1 Mfg FAS 01/02/07 Enh Out
2 Dis Aviance 10/02/07 Enh out
3 Mfg FAS 10/02/07 Enh In
4 Fin SEGA 11/01/07 Bug In

now i want to copy the row to Update.xls where the Status is "OUT" can any
one help me to write a macro for this

TIA


Hello there,
I am new at this VBA stuff, but what I created does work. There may
be a better way to do it, but until I learn more, use this.
Gary
Sub RtoUCopy()
Dim Var1 As Variant
Dim Var2 As Variant
Dim Var3 As Variant
Dim Var4 As Variant
Dim Var5 As Variant
Dim Var6 As Variant
Dim RowR As Integer
Dim RowU As Integer

' Both workbooks need to be open first. Cell A2 must be start
of data.
RowR = 2
RowU = 2
Application.Workbooks("Register.xls").Worksheets(1 ).Activate
Do While Not IsEmpty(Cells(RowR, 1))
Var6 = Cells(RowR, 6)
If LCase(Var6) = "out" Then
Var1 = Cells(RowR, 1)
Var2 = Cells(RowR, 2)
Var3 = Cells(RowR, 3)
Var4 = Cells(RowR, 4)
Var5 = Cells(RowR, 5)
Application.Workbooks("Update.xls").Worksheets(1). Activate
Cells(RowU, 1) = Var1
Cells(RowU, 2) = Var2
Cells(RowU, 3) = Var3
Cells(RowU, 4) = Var4
Cells(RowU, 5) = Var5
Cells(RowU, 6) = Var6
RowU = RowU + 1

Application.Workbooks("Register.xls").Worksheets(1 ).Activate
End If
RowR = RowR + 1
Loop
End Sub



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
How to write a macro JStiehl Excel Discussion (Misc queries) 4 August 11th 08 10:08 PM
How do I write a Macro that mydogpeanut Excel Programming 3 October 26th 06 02:46 PM
How to write a macro to do... marg Excel Programming 1 July 17th 06 08:20 PM
Help write Macro nc Excel Discussion (Misc queries) 5 November 17th 05 03:19 PM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM


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