Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Gracie Hughes   on Mar 04 In MS Office Category.

  
Question Answered By: Luisa Fischer   on Mar 04

Why don't you start off by recording a macro of you doing it one time. Then
you can add a loop to it.

Here is an example where I was copying a total value out of several sheets
and putting  the value into the one, :

Sub MoveTotal()
Dim strCounter As Integer

For counter = 1 To 230
strCounter = counter
Cells.Find(What:="Total", After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Range("A1:J1").Select
Selection.Copy
Sheets("SummaryLessMCA").Select
Range("A1").Select
ActiveCell.Offset(strCounter, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("Year 2001 less McA Salaried").Select
Next counter

End Sub

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Excel VBA - need to copy paste conditional statement Or get search suggestion and latest updates.


Tagged: