SampleDelete.xlsx
Hi, i need help in deleting the entire row in "Database" sheet based on the "Staff ID" entered in the "Entry" Sheet.
SampleDelete.xlsx
Hi, i need help in deleting the entire row in "Database" sheet based on the "Staff ID" entered in the "Entry" Sheet.
Last edited by DespoExcel; 10-21-2014 at 11:55 PM. Reason: My Friend has helped me to solve it
USE THIS CODE IN MACRO
ROW_1 = 1
COL = 1 ' CHANGE THIS AS PER YOUR ID COLUMN
ID = 10 'CHANGE THIS AS PER YOUR ID
Do Until Cells(ROW_1, COL) = ""
If Cells(ROW_1, COL).Value = ID Then
Rows(ROW_1 & ":" & ROW_1).Delete
End If
ROW_1 = ROW_1 + 1
Loop
Hi
you can use this
Please Login or Register to view this content.
Cheers.
Please Login or Register to view this content.
Uhmm. Almost the same as Post#4.
But this is a Sheet Event Code.Please Login or Register to view this content.
I have tried, however, it shows an error. And when i debug, it highlighted the following bold coding
Please Login or Register to view this content.
I have tried, however, it shows an error. And when i debug, it highlighted the following bold coding
Please Login or Register to view this content.
Hi DespoExcel,
Please this code :
Please Login or Register to view this content.
Modified:
Please Login or Register to view this content.
I have tried. The following coding that is bold is the result of the error - i debugged.
Please Login or Register to view this content.
Do you have an Actual Sheet named "Database"? Check the spelling.
Can you attach a sample with some dummy data where it doesn't do what you require? I will load and test.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks