Macro to be created

vishal005

New Member
Joined
Mar 28, 2015
Messages
10
Hi Guys,

I need help with the macro,

I have excel sheet which contains data in more than 4500 colums and 15000 rows.


I want a macro which will search a word of my choice in excel and if it found then the macro will copy that word along with cell which is adjucent to that cell (Left cell and Right cell) in other excel.

There are chances that specific word may exists in my excel for more than 2000 times.
 
just last favor can the results of search appear in new excel book also in results can you make some setting so that any row which contains text in column C gets delete automatically.
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Try this to delete the rows.
Code:
Sub DeleteFromSht2()
    Dim LastRow As Long
    Dim i As Integer
    
With Sheets("Sheet2")
    LastRow = .Cells(Rows.Count, "C").End(xlUp).Row
    For i = LastRow To 1 Step -1
        If .Cells(i, 3) = "Expense" Or .Cells(i, 3) = "Approved" Or .Cells(i, 3) = "Pending" Then
            .Cells(i, 3).EntireRow.Delete
        End If
    Next i
End With
End Sub
Sorry, I don't follow what you mean "do Trim on row a of sheet 2 after pulling out the details."
 
Upvote 0
thanks can we get the results in new workbook rather than in same sheet also can the delete macro in such away that if there is any word in column c of sheet 2 it will delete the entire row
 
Upvote 0
thanks can we get the results in new workbook rather than in same sheet also can the delete macro works in such away that if there is any word in column c of sheet 2 it will delete the entire row, can you merge above macro with the delete macro
 
Upvote 0

Forum statistics

Threads
1,216,127
Messages
6,129,024
Members
449,482
Latest member
al mugheen

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