ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I delete the same row in a multisheet spreadsheet (https://www.excelbanter.com/excel-discussion-misc-queries/206431-how-do-i-delete-same-row-multisheet-spreadsheet.html)

John M.Lees

How do I delete the same row in a multisheet spreadsheet
 
How do achieve the above please?
I am using a complicated multi sheet spreadsheet which reads from the first
sheet which comprises of fixed data.
I want to delete data row by row from the data sheet,which will then delete
corresponding rows from each following sheet.
Thank you

Mike H

How do I delete the same row in a multisheet spreadsheet
 
John

Maybe this. right click your 'data' sheet tab, view code and paste this in
and run it. Enter the row number to delete. I suggest you test this on a
non-critical workbook.

Sub DeleteIt()
Dim ws As Worksheet
response = InputBox("Enter row number to delete", vbOKCancel)
If response = "" Then Exit Sub
For x = 1 To Worksheets.Count
Sheets(x).Rows(response).EntireRow.Delete
Next
End Sub

"John M.Lees" wrote:

How do achieve the above please?
I am using a complicated multi sheet spreadsheet which reads from the first
sheet which comprises of fixed data.
I want to delete data row by row from the data sheet,which will then delete
corresponding rows from each following sheet.
Thank you


Peo Sjoblom[_2_]

How do I delete the same row in a multisheet spreadsheet
 
Do you mean that if you delete row 4 in one sheet row 4 should be deleted in
all the sheets

If you group the sheets before you do this they all will be deleted

(click first tab, hold down shift and click last tab.

Don't forget to ungroup the sheets when you are done

--


Regards,


Peo Sjoblom

"John M.Lees" <John wrote in message
...
How do achieve the above please?
I am using a complicated multi sheet spreadsheet which reads from the
first
sheet which comprises of fixed data.
I want to delete data row by row from the data sheet,which will then
delete
corresponding rows from each following sheet.
Thank you





All times are GMT +1. The time now is 07:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com