Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
have a workbook which contains 14 pages,
the first page contains employee info, and the other 13 pages read info from the first page the first page also reads info from the other 13 pages if a row is deleted on page one is their a way to delete all the matching rows on the other pages thanks in advance |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Select all sheets or just the ones you want. Then use the right arrow key
delete function on any of the sheets. -- Don Guillett SalesAid Software "Rich" wrote in message ... have a workbook which contains 14 pages, the first page contains employee info, and the other 13 pages read info from the first page the first page also reads info from the other 13 pages if a row is deleted on page one is their a way to delete all the matching rows on the other pages thanks in advance |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Don Guillett wrote:
Select all sheets or just the ones you want. Then use the right arrow key delete function on any of the sheets. This only works if the matching records are on the same row as the record to be deleted. Alan Beban |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
thanks
yes all the matching data is on the same row, , what i am looking for is a way to delete the matching records, without the need to select all sheets, because using that option if someone starts to reenter data when all the sheets are selected it will also enter the data on all the other sheets. i guess it will have to be some kink of makro, ? but rather than have a macro on each line i guess i would need one that asks who to delete then deletes him off eash page along with his matching data thanks anyway "Alan Beban" wrote: Don Guillett wrote: Select all sheets or just the ones you want. Then use the right arrow key delete function on any of the sheets. This only works if the matching records are on the same row as the record to be deleted. Alan Beban |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
at the min i am using the following:-
Sub line9() Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Application.ScreenUpdating = False Sheets(Array("Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sep", "Oct", _ "Nov", "Dec")).Select Range("E9:AI9").Select Selection.ClearContents Sheets("Overview").Select Range("B9:E9").Select Selection.ClearContents Range("B9").Select Application.ScreenUpdating = True End Sub using this macro i would have to write it approx 130 times down the main page next to each persons name. i was hoping to be able to do a "one hit" button which when i click on it, it will ask me which row to delete rather than having 130 macros saying the same thing |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You could also do for ALL sheets except by
for each sh in worksheets if sh.name<"dontdeletethisone" then sh.rows(x).delete next sh -- Don Guillett SalesAid Software "Don Guillett" wrote in message ... try this. Correct word wrap and add the other months. NO selections necessary or desired so no screen updating. Sub DeleteRequestedRowsInAllSheets() Dim sh As Worksheet x = InputBox("Put in Row NUMBER to Delete") Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub For Each sh In Worksheets(Array("Jan", "Feb", "Overview")) sh.Rows(x).Delete Next sh End Sub -- Don Guillett SalesAid Software "Rich" wrote in message ... at the min i am using the following:- Sub line9() Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Application.ScreenUpdating = False Sheets(Array("Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sep", "Oct", _ "Nov", "Dec")).Select Range("E9:AI9").Select Selection.ClearContents Sheets("Overview").Select Range("B9:E9").Select Selection.ClearContents Range("B9").Select Application.ScreenUpdating = True End Sub using this macro i would have to write it approx 130 times down the main page next to each persons name. i was hoping to be able to do a "one hit" button which when i click on it, it will ask me which row to delete rather than having 130 macros saying the same thing |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
thanks don, thats works better than i expected
"Don Guillett" wrote: You could also do for ALL sheets except by for each sh in worksheets if sh.name<"dontdeletethisone" then sh.rows(x).delete next sh -- Don Guillett SalesAid Software "Don Guillett" wrote in message ... try this. Correct word wrap and add the other months. NO selections necessary or desired so no screen updating. Sub DeleteRequestedRowsInAllSheets() Dim sh As Worksheet x = InputBox("Put in Row NUMBER to Delete") Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub For Each sh In Worksheets(Array("Jan", "Feb", "Overview")) sh.Rows(x).Delete Next sh End Sub -- Don Guillett SalesAid Software "Rich" wrote in message ... at the min i am using the following:- Sub line9() Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Application.ScreenUpdating = False Sheets(Array("Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sep", "Oct", _ "Nov", "Dec")).Select Range("E9:AI9").Select Selection.ClearContents Sheets("Overview").Select Range("B9:E9").Select Selection.ClearContents Range("B9").Select Application.ScreenUpdating = True End Sub using this macro i would have to write it approx 130 times down the main page next to each persons name. i was hoping to be able to do a "one hit" button which when i click on it, it will ask me which row to delete rather than having 130 macros saying the same thing |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
glad it helped
-- Don Guillett SalesAid Software "Rich" wrote in message ... thanks don, thats works better than i expected "Don Guillett" wrote: You could also do for ALL sheets except by for each sh in worksheets if sh.name<"dontdeletethisone" then sh.rows(x).delete next sh -- Don Guillett SalesAid Software "Don Guillett" wrote in message ... try this. Correct word wrap and add the other months. NO selections necessary or desired so no screen updating. Sub DeleteRequestedRowsInAllSheets() Dim sh As Worksheet x = InputBox("Put in Row NUMBER to Delete") Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub For Each sh In Worksheets(Array("Jan", "Feb", "Overview")) sh.Rows(x).Delete Next sh End Sub -- Don Guillett SalesAid Software "Rich" wrote in message ... at the min i am using the following:- Sub line9() Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Application.ScreenUpdating = False Sheets(Array("Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sep", "Oct", _ "Nov", "Dec")).Select Range("E9:AI9").Select Selection.ClearContents Sheets("Overview").Select Range("B9:E9").Select Selection.ClearContents Range("B9").Select Application.ScreenUpdating = True End Sub using this macro i would have to write it approx 130 times down the main page next to each persons name. i was hoping to be able to do a "one hit" button which when i click on it, it will ask me which row to delete rather than having 130 macros saying the same thing |
#11
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() would the same princibles be able to enter new names in a specific row ? it would also need to be able to copy the formulas from the row above ???? |
#12
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Again, more info. No mind reading here.
-- Don Guillett SalesAid Software "Rich" wrote in message ... would the same princibles be able to enter new names in a specific row ? it would also need to be able to copy the formulas from the row above ???? |
#13
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() using the macro code you gave me i altered it so that it could insert a line as well as delete one. that works fine, however on each page jan - dec their are formulas in colums b threw d , when i reun the macro to insert a new line i also need to to imput the formulas, have tried telling it to copy and paste the formulas from the row below the new row, but cant seem to get it to work with the X variable |
#14
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
copy/paste your code here
-- Don Guillett SalesAid Software "Rich" wrote in message ... using the macro code you gave me i altered it so that it could insert a line as well as delete one. that works fine, however on each page jan - dec their are formulas in colums b threw d , when i reun the macro to insert a new line i also need to to imput the formulas, have tried telling it to copy and paste the formulas from the row below the new row, but cant seem to get it to work with the X variable |
#15
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Don,
You seem to have a real command of this subject and I need some help. I'm creating a consolidated workbook of data that is imported from multiple sites each week. Sheet1 is graphs, so nothing to do with this. Sheet2 is the Master List of locations, column A is location number, column B is location name. Starting with Column 3 are ending dates for each week (Sundays). There are 15 pages, each with one datapoint from the location reports (which has 15 totals that I'm posting from like Daily Sales Total, on one sheet, Calls Run, on another sheet, etc.). The macro copies datapoint1 from the location's report, goes to the consolidated workbook, sheet2 and finds the cell that intersets with the location number and the date from the location report and writes the result. It does this 15 times, one datapoint per sheet with each datapoint, moving to the next sheet. My problem comes when I need to add a new location or need to sort the data. I have started with giving range A1:B200 a range name (NameList) and then using the formula =IF(Sheet1!A1="","",OFFSET(NameList,0,0)) on the following sheets. But, as I started testing, this works great on the first two columns, so that if I enter a row and put new data, the number and name are correct (I have a macro that autofills if any changes are made on the first sheet), but all the other columns are of course not affected. What I'm really after is to have sheet2 be my master sheet and the other 14 sheets "act" like sheet2 for columns A & B and then all the data for each week stay on the same row for the location. If I insert a row, I want all sheets to have a row inserted. If I sort sheet2 (always by columns 1 and 2), I want all sheets to be sorted the same way, along with all the corresponding data. I saw your option of highlighing all sheets, and inserting or deleting a row. This would be perfect until I get to the sorting part. Would you have a macro solution, or is there a better approach to what I'm trying to do. Thanks much and hope you have a Great Christmas! "Don Guillett" wrote: try this. Correct word wrap and add the other months. NO selections necessary or desired so no screen updating. Sub DeleteRequestedRowsInAllSheets() Dim sh As Worksheet x = InputBox("Put in Row NUMBER to Delete") Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub For Each sh In Worksheets(Array("Jan", "Feb", "Overview")) sh.Rows(x).Delete Next sh End Sub -- Don Guillett SalesAid Software "Rich" wrote in message ... at the min i am using the following:- Sub line9() Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Application.ScreenUpdating = False Sheets(Array("Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sep", "Oct", _ "Nov", "Dec")).Select Range("E9:AI9").Select Selection.ClearContents Sheets("Overview").Select Range("B9:E9").Select Selection.ClearContents Range("B9").Select Application.ScreenUpdating = True End Sub using this macro i would have to write it approx 130 times down the main page next to each persons name. i was hoping to be able to do a "one hit" button which when i click on it, it will ask me which row to delete rather than having 130 macros saying the same thing |
#16
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This looks more like a "project" than an answer to a question. Contact me
privately with a workbook and details if you want custom work. -- Don Guillett SalesAid Software "David" wrote in message ... Don, You seem to have a real command of this subject and I need some help. I'm creating a consolidated workbook of data that is imported from multiple sites each week. Sheet1 is graphs, so nothing to do with this. Sheet2 is the Master List of locations, column A is location number, column B is location name. Starting with Column 3 are ending dates for each week (Sundays). There are 15 pages, each with one datapoint from the location reports (which has 15 totals that I'm posting from like Daily Sales Total, on one sheet, Calls Run, on another sheet, etc.). The macro copies datapoint1 from the location's report, goes to the consolidated workbook, sheet2 and finds the cell that intersets with the location number and the date from the location report and writes the result. It does this 15 times, one datapoint per sheet with each datapoint, moving to the next sheet. My problem comes when I need to add a new location or need to sort the data. I have started with giving range A1:B200 a range name (NameList) and then using the formula =IF(Sheet1!A1="","",OFFSET(NameList,0,0)) on the following sheets. But, as I started testing, this works great on the first two columns, so that if I enter a row and put new data, the number and name are correct (I have a macro that autofills if any changes are made on the first sheet), but all the other columns are of course not affected. What I'm really after is to have sheet2 be my master sheet and the other 14 sheets "act" like sheet2 for columns A & B and then all the data for each week stay on the same row for the location. If I insert a row, I want all sheets to have a row inserted. If I sort sheet2 (always by columns 1 and 2), I want all sheets to be sorted the same way, along with all the corresponding data. I saw your option of highlighing all sheets, and inserting or deleting a row. This would be perfect until I get to the sorting part. Would you have a macro solution, or is there a better approach to what I'm trying to do. Thanks much and hope you have a Great Christmas! "Don Guillett" wrote: try this. Correct word wrap and add the other months. NO selections necessary or desired so no screen updating. Sub DeleteRequestedRowsInAllSheets() Dim sh As Worksheet x = InputBox("Put in Row NUMBER to Delete") Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub For Each sh In Worksheets(Array("Jan", "Feb", "Overview")) sh.Rows(x).Delete Next sh End Sub -- Don Guillett SalesAid Software "Rich" wrote in message ... at the min i am using the following:- Sub line9() Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Application.ScreenUpdating = False Sheets(Array("Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sep", "Oct", _ "Nov", "Dec")).Select Range("E9:AI9").Select Selection.ClearContents Sheets("Overview").Select Range("B9:E9").Select Selection.ClearContents Range("B9").Select Application.ScreenUpdating = True End Sub using this macro i would have to write it approx 130 times down the main page next to each persons name. i was hoping to be able to do a "one hit" button which when i click on it, it will ask me which row to delete rather than having 130 macros saying the same thing |
#17
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
After looking at all my options, I'm just going to add the new entries at the
end and not worry about sorting. Thanks! "Don Guillett" wrote: This looks more like a "project" than an answer to a question. Contact me privately with a workbook and details if you want custom work. -- Don Guillett SalesAid Software "David" wrote in message ... Don, You seem to have a real command of this subject and I need some help. I'm creating a consolidated workbook of data that is imported from multiple sites each week. Sheet1 is graphs, so nothing to do with this. Sheet2 is the Master List of locations, column A is location number, column B is location name. Starting with Column 3 are ending dates for each week (Sundays). There are 15 pages, each with one datapoint from the location reports (which has 15 totals that I'm posting from like Daily Sales Total, on one sheet, Calls Run, on another sheet, etc.). The macro copies datapoint1 from the location's report, goes to the consolidated workbook, sheet2 and finds the cell that intersets with the location number and the date from the location report and writes the result. It does this 15 times, one datapoint per sheet with each datapoint, moving to the next sheet. My problem comes when I need to add a new location or need to sort the data. I have started with giving range A1:B200 a range name (NameList) and then using the formula =IF(Sheet1!A1="","",OFFSET(NameList,0,0)) on the following sheets. But, as I started testing, this works great on the first two columns, so that if I enter a row and put new data, the number and name are correct (I have a macro that autofills if any changes are made on the first sheet), but all the other columns are of course not affected. What I'm really after is to have sheet2 be my master sheet and the other 14 sheets "act" like sheet2 for columns A & B and then all the data for each week stay on the same row for the location. If I insert a row, I want all sheets to have a row inserted. If I sort sheet2 (always by columns 1 and 2), I want all sheets to be sorted the same way, along with all the corresponding data. I saw your option of highlighing all sheets, and inserting or deleting a row. This would be perfect until I get to the sorting part. Would you have a macro solution, or is there a better approach to what I'm trying to do. Thanks much and hope you have a Great Christmas! "Don Guillett" wrote: try this. Correct word wrap and add the other months. NO selections necessary or desired so no screen updating. Sub DeleteRequestedRowsInAllSheets() Dim sh As Worksheet x = InputBox("Put in Row NUMBER to Delete") Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub For Each sh In Worksheets(Array("Jan", "Feb", "Overview")) sh.Rows(x).Delete Next sh End Sub -- Don Guillett SalesAid Software "Rich" wrote in message ... at the min i am using the following:- Sub line9() Resp = MsgBox(Prompt:="This Action Will Reset All Pre Entered Data For This Employee Continue?", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Resp = MsgBox(Prompt:="Are You Sure You Want To Continue - This Action Can Not Be Undone", Buttons:=vbYesNo) If Resp = vbNo Then Exit Sub Application.ScreenUpdating = False Sheets(Array("Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sep", "Oct", _ "Nov", "Dec")).Select Range("E9:AI9").Select Selection.ClearContents Sheets("Overview").Select Range("B9:E9").Select Selection.ClearContents Range("B9").Select Application.ScreenUpdating = True End Sub using this macro i would have to write it approx 130 times down the main page next to each persons name. i was hoping to be able to do a "one hit" button which when i click on it, it will ask me which row to delete rather than having 130 macros saying the same thing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete rows listed less than 8 times??? | Excel Worksheet Functions | |||
Delete Rows where cells does not meet criteria | Excel Worksheet Functions | |||
Want to delete rows | Excel Discussion (Misc queries) | |||
How can we delete rows permanently from excel sheet | Excel Discussion (Misc queries) | |||
Delete specified critria rows | Excel Discussion (Misc queries) |