Code for Delete MATCH Rows

MrRajKumar

Active Member
Joined
Jan 29, 2008
Messages
276
Office Version
  1. 365
Platform
  1. Windows
Hi All.

There are 7 Sheets in my workbook.Sheet1 and Sheet2 contains Datas. I have named range Data1 [Sheet1A3:K2500], Data2 [Sheet2A3:k2500]. In Sheet3 i have a formulas for Left Lookup in A3,B3,C3,D3,E3,F3,H3,I3 and down to row 2500, that is

=IF(ISERR(OFFSET(DATA1,MATCH($G3,OFFSET(DATA1,0,6,ROWS(DATA1),1),0)-1,0,1,1)),OFFSET(DATA2,MATCH($G3,OFFSET(DATA2,0,6,ROWS(DATA2),1),0)-1,0,,1,1),OFFSET(DATA1,MATCH($G3,OFFSET(DATA1,0,6,ROWS(DATA1),1),0)-1,0,1,1))

This formula working perfectly. I am looking here if datas are true in Sheet3 row 3, i want to delete the Matching row from Data1 or Data2 and in Sheet3 row 3 results changed to value before save the workbook.

Eg;

Sheet3A3=1, B3=2, C3=3, D3=4, E3=5, F3=6, H3=7, J3=8, K3=9. These values i got from above formula, If this row are TRUE i want to delete the Matching row in Data1 or Data2 and replace the formula in row 3 to values. But i want to keep the below rows formulas (SheetA3:K2500).

How can i do this? I am a beginner in VBA, so please mention how to do?

All replys are appreciated.

Thank you
Raj
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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