ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   printing (https://www.excelbanter.com/excel-programming/322703-printing.html)

Fernando Duran[_3_]

printing
 
I need some help in writing a routine to print in this way... 3 sheets,
one in English, one in French and the third one, to enter all the
information, with a flag, E for English and F for French, in this page,
each line will be the information for the other two pages, but I want to
be print sequentially, once one if finish, the line will be clear and
then the next line will print, and so on.
Can I do this in excel?

Thanks,

Fernando

gocush[_29_]

printing
 
Not exactly sure what you are looking for but this might help you get started:

Assumptions:
You are entering data in Sheet1
You enter in col A either "E" for Eng or "F" for French
You enter data in Col B
After entering all your data in Col B you click a command button to fire the
following macro which will copy your data to the correct sheet E or F.
You can then delete your entry data sheet 1.



Option Explicit

Sub Eng_French()

Dim oCell As Range
Dim E As Worksheet
Dim F As Worksheet

Set E = Worksheets("E")
Set F = Worksheets("F")


For Each oCell In Range("B1:B100")
If oCell < "" Then
Select Case UCase(oCell.Offset(0, -1))
Case Is = "E"
oCell.EntireRow.Copy
E.Range("A65536").End(xlUp).Offset(1, 0)
Case Is = "F"
oCell.EntireRow.Copy
F.Range("A65536").End(xlUp).Offset(1, 0)
Case Else
MsgBox "Row " & oCell.Row & " is not flagged.", vbOKOnly
End Select
End If
Next oCell

Set E = Nothing
Set F = Nothing
Set oCell = Nothing

End Sub


Rather than all data being entered, followed by a command button, you could
do this one line at a time by placing the following code in the Sheet1 object:

Private Sub Worksheet_Change (ByVal Target as Range)
If Target.Cells.Count = 1 then
Application.EnableEvents = False
If Not Intersect(Target, Range("A1") Is Nothing Then
If Target.Offset(0,1)<"" Then
Eng_French
Target.Entirerow.Eelete
End If
End if
Application.EnableEvents = True
End if
End Sub


"Fernando Duran" wrote:

I need some help in writing a routine to print in this way... 3 sheets,
one in English, one in French and the third one, to enter all the
information, with a flag, E for English and F for French, in this page,
each line will be the information for the other two pages, but I want to
be print sequentially, once one if finish, the line will be clear and
then the next line will print, and so on.
Can I do this in excel?

Thanks,

Fernando



All times are GMT +1. The time now is 02:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com