私は現在、以下のスクリプトを実行しています
Sub Gift_Certificate()
'Select Bridge Data from tab, cell A2
Sheets("Bridge Data").Select
Range("A2").Select
'Loop while activecell is not blank (goes down the column)
Do While ActiveCell <> ""
'Repeat below step if data needs to be sorted into multiple wksts'
' Also, create individual worksheets for each
If InStr(1, ActiveCell, "Gift Certificate", 1) <> 0 Then
ActiveCell.EntireRow.Copy
Sheets("GC Redeemed").Select
Range("A10").Select
Else
'If it's not an extension you have specified, it highlites the cell because its cool'
ActiveCell.Interior.ColorIndex = 6
GoTo SKIPPING
End If
Range("A10").Select
'Loops down until there's an open cell'
Do While ActiveCell <> ""
ActiveCell.Offset(1, 0).Select
Loop
ActiveSheet.PasteSpecial
'Go back to the starting sheet & iterate to the next row
Sheets("Bridge Data").Select
SKIPPING:
ActiveCell.Offset(1, 0).Select
Loop
End Sub
これを使用して、あるタブのデータをスキャンし、選択したデータを別のタブにコピーしています。私が直面している問題は、新しく貼り付けたデータから数式を実行したいのですが、スクリプトを実行すると、新しい行がタブに挿入され、すべての数式が押し下げられます。
挿入ではなく、スクリプトにデータを新しいタブにコピーさせたいだけです。
何かアドバイス?
ps、私はvbの経験がほとんどないので、気楽にやってください!
ありがとう、
-ショーン