LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
B_Carpet
 
Posts: n/a
Default pasting and one other problem


ok i want my macro to:

1)copy (from "wages" sheet) and paste one value into one cell (c12 in
"ast")

2)then for excel to open another sheet ("gates") and if "A1" is the
name i want it to be i want excel to copy "b2" into "C4" in "ast"

so far i got

Sheets("prem_wages").Select
Range("B2").Select
Selection.Copy
Sheets("ast").Select
Range("C12").Select

which i know will copy and select what i want for the first bit, but
how do i get it to then paste it in for me?

And for the second point i am not sure where to start cause the data i
get will look summat like this each week:

Newcastle 42000 Blackburn
blues 42000 Man utd
Boro 13000 Sheff utd
aston_villa 1000 Arsenal

I'd imagine it was some thing like:

Sheets("prem_gates").Select
If (A1) = aston_villa then
Range("B1").Select
Selection.Copy
Sheets("ast").Select
Range("C4").Select
else
If (A2) = aston_villa then
Range(b2).Select
Selection.Copy
Sheets("ast").Select
Range("C4").Select
else
If (A3) = aston_villa then
Range("B3").Select
Selection.Copy
Sheets("ast").Select
Range("C4").Select
else
If (A4) = aston_villa then
Range("B4").Select
Selection.Copy
Sheets("ast").Select
Range("C4").Select

Obviously i am probably wrong but if some one could help with either
problem it would be great

Alex


--
B_Carpet
------------------------------------------------------------------------
B_Carpet's Profile: http://www.excelforum.com/member.php...o&userid=20207
View this thread: http://www.excelforum.com/showthread...hreadid=390019

 
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



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