Vishaal
Well-known Member
- Joined
- Mar 16, 2019
- Messages
- 543
- Office Version
- 2010
- 2007
- Platform
- Windows
- Web
Hi all,
i am using this code but want to few changes, please help
Private Sub CommandButton1_Click()
a = Worksheets(“Sheet1”) .Cells(Rows.Count, 1) .End(x1Up) .Row
For I = 2 To a
If Worksheets (“Sheet1”) .Cells(I, 3) .Value = “North” Then
Worksheets (“Sheet1”) .Rows(i) .Copy
Worksheets (“Sheet2”) .Activate
b = Worksheets (“Sheet2”) .Cells(Rows.Count, 1) .End(x1Up) .Row
Worksheets (“Sheet2”) .Cells(b + 1, 1) .Select
ActiveSheet.Paste
Worksheets(“Sheet1”) .Activate
End If
Next
Application.CutCopyMode = False
ThisWorkbook.Worksheets(“Sheet1”) .Cells(1, 1) .Select
End Sub
i have a master data sheet
Excel 2007 32 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
[/table][Table="width:, class:grid"][tr][td]Sheet: ENGLISH[/td][/tr][/table]
We change the price regularly on many products and want to copy all the products entire row where the price has change in one new file. so that we can mail it to all our suppliers.
It will be great if also get a code for send to mail to our all suppliers through vb code (file will be in attachment) and body description will be same.
pls provide the code
i am using this code but want to few changes, please help
Private Sub CommandButton1_Click()
a = Worksheets(“Sheet1”) .Cells(Rows.Count, 1) .End(x1Up) .Row
For I = 2 To a
If Worksheets (“Sheet1”) .Cells(I, 3) .Value = “North” Then
Worksheets (“Sheet1”) .Rows(i) .Copy
Worksheets (“Sheet2”) .Activate
b = Worksheets (“Sheet2”) .Cells(Rows.Count, 1) .End(x1Up) .Row
Worksheets (“Sheet2”) .Cells(b + 1, 1) .Select
ActiveSheet.Paste
Worksheets(“Sheet1”) .Activate
End If
Next
Application.CutCopyMode = False
ThisWorkbook.Worksheets(“Sheet1”) .Cells(1, 1) .Select
End Sub
i have a master data sheet
Excel 2007 32 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
A
[/th][th]B
[/th][th]C
[/th][th]D
[/th][th]E
[/th][th]F
[/th][th]G
[/th][th]H
[/th][th]I
[/th][th]J
[/th][th]K
[/th][th]L
[/th][th]M
[/th][th]N
[/th][th]O
[/th][th]P
[/th][th]Q
[/th][/tr][tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
1
[/td][td=bgcolor:#93CDDD]ISBN
[/td][td=bgcolor:#93CDDD]S.No.
[/td][td=bgcolor:#93CDDD]CATEGORY
[/td][td=bgcolor:#93CDDD]BOOK TITLE
[/td][td=bgcolor:#93CDDD]BOOK CODE
[/td][td=bgcolor:#93CDDD]BOOK PRICE
[/td][td=bgcolor:#93CDDD]AUTHOR
[/td][td=bgcolor:#93CDDD]Language
[/td][td=bgcolor:#93CDDD]SUBJECT[/td][td=bgcolor:#93CDDD]Binding
[/td][td=bgcolor:#93CDDD]Publisher
[/td][td=bgcolor:#93CDDD]Stock
[/td][td=bgcolor:#93CDDD]Page No.
[/td][td=bgcolor:#93CDDD]Length (CM)
[/td][td=bgcolor:#93CDDD]Width (CM)
[/td][td=bgcolor:#93CDDD]Height (CM)
[/td][td=bgcolor:#93CDDD]Weight
[/td][/tr][tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
2
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
3
[/td][td]9789388701563
[/td][td]1
[/td][td]RECENT RELEASES[/td][td]20 Practice Sets RAILWAY RECRUITMENT BOARD NTPC (GRADUATE) CBT (IInd Stage)[/td][td]3009
[/td][td]215.00
[/td][td]Abhinav Jha[/td][td]English[/td][td]COMPETITION BOOKS[/td][td]paperback[/td][td]Citizen Publication[/td][td]50
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr][tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
4
[/td][td]9789388701570
[/td][td]1
[/td][td]RECENT RELEASES[/td][td]NURSING RECRUITMENT EXAM. [/td][td]3012
[/td][td]165.00
[/td][td]B.M.Thulasidas & K.V.Usha[/td][td]English
[/td][td]COMPETITION BOOKS[/td][td]paperback[/td][td]Citizen Publication[/td][td]50
[/td][td]188
[/td][td]27.3
[/td][td]19.5
[/td][td]0.8
[/td][td]298
[/td][/tr][tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
5
[/td][td]9789388701617
[/td][td]1
[/td][td]RECENT RELEASES[/td][td]SSC Multi Tasking (NON-TECHNICAL) STAFF RECRUITMENT EXAM. 82 SOLVED PAPERS 2017[/td][td]3013
[/td][td]620.00
[/td][td]Abhinav Jha[/td][td]English
[/td][td]COMPETITION BOOKS[/td][td]paperback
[/td][td]Citizen Publication[/td][td]50
[/td][td]716
[/td][td]27.3
[/td][td]19.5
[/td][td]3.2
[/td][td]982
[/td][/tr][tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
6
[/td][td]9789388701525
[/td][td]1
[/td][td]RECENT RELEASES[/td][td]CCC Course on Computer Concepts [/td][td]3011
[/td][td]155.00
[/td][td]Abhinav Jha[/td][td]English
[/td][td]COMPETITION BOOKS[/td][td]paperback
[/td][td]Citizen Publication[/td][td]50
[/td][td]180
[/td][td]27.3
[/td][td]19.5
[/td][td]0.8
[/td][td]282
[/td][/tr][/table][Table="width:, class:grid"][tr][td]Sheet: ENGLISH[/td][/tr][/table]
We change the price regularly on many products and want to copy all the products entire row where the price has change in one new file. so that we can mail it to all our suppliers.
It will be great if also get a code for send to mail to our all suppliers through vb code (file will be in attachment) and body description will be same.
pls provide the code