Copying Row based on text in a Cell

Bob Folks

Board Regular
Joined
Jun 25, 2015
Messages
70
Hi

I am new to this Forum but look forward to many productive hours here.

I was hoping someone could help me I recuire a Macro to look at data from a Data Dump and cut the whole row and paste it onto a new sheet when the cell of that row in column "K" = [TBS]. I sure this can be done but I just cant work it out.

Any Assistance would be greatfullt apretiated.

Cheers

Bob
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi Bob and welcome to the forum
Is this text [TBS] the only text in the cell
AND
does it have the square brackets around it or was that just to highlight the text ??
Also, what is the name of the source sheet AND the destination sheet
 
Upvote 0
Hi Micheal

Thanks for your responce. There is other text in the Column but in the actual cell there either [TBS] or some other item but when it says [TBS] thats all it says, and yes it has square brackets. The source sheet is called Rpt_Heat_Summary_Standard.xls which is a data dump from a data base we use and I wish to import the data into a Tab on a workbook called zzData that I call TBS. I run this report every morning and will be blanking out the TBS sheet at the start of the process every day so as I get the most upto date values.

Once again Thanks in advance
Bob
 
Upvote 0
So, your not just moving the data from 1 sheet to the other in the same workbook......it's to a completely separate workbook ??
If that is the case what is the sheet tab in this workbook...Rpt_Heat_Summary_Standard.xls ?
 
Upvote 0
This macro copies From Sheet1 to Sheet2, Row 1 to 100
Code:
Sub CopyRows()


Dim T As Long, X As Long


With Sheets("Sheet1")
For T = 1 To 100
    If .Range("K" & T) = "[TBS]" Then
    X = X + 1
     .Range("A" & T & ":M" & T).Copy Sheets("Sheet2").Range("A" & X)
    End If
Next T
End With
End Sub
 
Upvote 0
Upvote 0
well when I looked Mike had not replied, but as always as soon as I post..... I am second
LOL
 
Upvote 0
Hi Guys thanks for all the responces I the Rpt_Heat_Summary_Standard.xls that the Data comes from is Heat Summary. I am reading and looking at all the other responces also so thanks.

Cheers

Bob
 
Upvote 0
Can you confirm my questions in post #4 please, that are copying between workbooks AND NOT worksheets ???
 
Upvote 0
Hey Micheal

I have thought about this and was originaly trying to copy between Workbooks but as I need to do further work with this data down the track i have moved it to the same workbook. It just seems more logical that way and I didn't think of that till you mentioned it. Sorry for the Run Around, I am now attempting to Copy from Heat Summary to TBS in the same work book

Cheers

Bob
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,557
Latest member
richa mishra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top