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: 1
Default copying cells to another workbook if the contain spacific words

need a macro

i want to copy cell from o awork sheet to a spacific work sheet
if one cell = a spacific word eg bars, maintinance, kings,reef
i want it to copy it to a sheet called that spacific work in a new
work book

i wrote the following macro

Sheets("order Sheet").Select
If Range("E3") = "1" Then
Range("a3:o3").Select
Selection.Copy
End If
If Range("e4") = "1" Then
Range("a3:o3").Select
Selection.Copy
End If
Application.Run "copyfromordersheetadmin"
end sub

Public Sub Copyfromordersheetadmin()
Windows("purchase orders.xls").Activate
ActiveWindow.WindowState = xlNormal
Sheets("Order Sheet").Select
Selection.Copy
' Sheets("Stock Record").Select
' Selection.SpecialCells(xlCellTypeLastCell).Select
' ActiveCell.Offset(1, -11).Select

gotolastcelladmin

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
'Selection.SpecialCells(xlCellTypeLastCell).Select
Range("a1").Select




End Sub
Public Sub gotolastcelladmin()

Windows("department orders.xls").Activate
ActiveWindow.WindowState = xlNormal
Sheets("admin").Select
ActiveSheet.Cells(1, 1).Select
Set tbl = ActiveCell.CurrentRegion
tbl.Offset(tbl.Rows.Count, 0).Resize(tbl.Rows.Count - (tbl.Rows.Count -
1), tbl.Columns.Count - (tbl.Columns.Count - 1)).Select

End Sub

this worked and i wrote a macro for each of the words
and then created a macro that would run all of these macros
but it copied to to all sheets not just the sheet that i told it to
copy it to



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

 
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
Copying cells between sheets in a workbook Rick Excel Discussion (Misc queries) 2 November 21st 08 01:55 PM
Copying cells from one workbook to another Quinci Excel Worksheet Functions 0 January 25th 08 05:57 PM
Automatically copying cells to another workbook Just Askin Setting up and Configuration of Excel 1 July 13th 07 08:06 AM
How do I revert cells to blank automatically on spacific days? Conker10382 Excel Discussion (Misc queries) 5 May 25th 06 05:14 PM
how do i get a pop up with reminders of things to do at spacific . abc answering service Excel Discussion (Misc queries) 2 December 27th 05 05:31 PM


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