Hi everyone,
it is possible when entering a value in the cell A5005 the values of rows A6 to A1006 are deleted
max
Hi everyone,
it is possible when entering a value in the cell A5005 the values of rows A6 to A1006 are deleted
max
Place this macro in the sheets vbe module, it will do what you're asking for.![]()
Please Login or Register to view this content.
Last edited by rollis13; 01-11-2021 at 07:51 PM.
Hi rollis13 thanks you.
Your macro it works almost well.
now it deletes the lines but it must not delete them, it must only delete the content.
I modified it like this:
but the empty lines remain at the top.![]()
Please Login or Register to view this content.
after deletion, the remaining lines must be brought up to the same position in top
I hope I have explained
max
That's exactly what you asked for, you didn't ask for Clearing the cells.the values of rows A6 to A1006 are deleted
To avoid empty rows at the top you can have a try this other version of the macro, fix the ranges if necessary:![]()
Please Login or Register to view this content.
Hi rollis it's o.k. now there is a problem
the data in the "valori" sheet is inserted by another macro
and then with the macro
Private Sub Worksheet_Change(ByVal Target As Range)
does not work
The macro in the attached file (post #5) works as required, so ... how do you expect someone who doesn't know your project to make some other diagnosis, so blindly ? What does this other macro do ? how does it work ? where is it placed ?
Is it not possible for the sheet to update even if it is not open?
Impossible, some sort of access must be done if changes need to be made.
Hello,
excuse my ignorance but it can be replaced
Private Sub Worksheet_Change(ByVal Target As Range)
with
Private Sub Worksheet_Activate()
i tried but it gives error here
If Target.Cells.Count > 1 Then Exit Sub
No, you can't do that, they are different events, Worksheet_Activate triggers only once when you change sheet while Worksheet_Change triggers when you manually change the contents of a cell (the Target) and its value/address/content is available within the macro (ByVal Target As Range).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks