I searching for a script that deletes cell a1 sheet ''buy'', if the som of row a1:a10 sheet ''sell'' >1
I searching for a script that deletes cell a1 sheet ''buy'', if the som of row a1:a10 sheet ''sell'' >1
typed without excel
Formula:![]()
Please Login or Register to view this content.
Happy with my answer * Add Reputation.
If You are happy with solution, please use Thread tools and mark thread as SOLVED.
Converted to my sheets it doesn't work. Is VBA understands "l to S"?
![]()
Please Login or Register to view this content.
What these letters are? Why there are "102" in code?
Do you want to checking by columns? It won't working like that.
Attached file with sample data, maybe we can help You more.
I can't share the sheet with you. Ik can make en example sheet.
The 102 is te row.
If row 102 L to S > 1
Then Sheets("Chemicalien").Range("O3").Value = ""
Do you mean cells L102:S102?
You've said A1:A10 >1.
Sounds like you want sum of row 102, columns L tot S?
*Ik weet niet of dat in Nederlands excel precies zo wordt geschreven? Sum is in youw excel Som?![]()
Please Login or Register to view this content.
Last edited by Arkadi; 02-01-2019 at 09:44 AM.
Please help by:
Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know
There are 10 kinds of people in this world... those who understand binary, and those who don't.
That is what i want. But you code give a error at Cells(102, 12)
Worked on my computer.. maybe we try range instead of cells:
![]()
Please Login or Register to view this content.
Nope error at Range("L102")
Let's see if that is really the problem.... try just one simple line of code:
Does that work?![]()
Please Login or Register to view this content.
Same "L102" error
What is the error?
Find it strange that there is no basi function in excel that clears/delete a cell in a Iff function
type was there
![]()
Please Login or Register to view this content.
It would be great if you could upload a sample workbook. Include the exact same sheet names and code that gives error.
That could help KOKOSEK, but what I posted worked on my end. Besides, the test I asked him to do gave the same issue. Which was just a basic one cell range
They all give the same error.
In dutch: Ongeldig buiten procedure.
Something like: Invalid outside procedure
can you show all code in your module please?
Can i just copy paste a If Application in a module?
I think the problem is you didn't put the code INSIDE a sub? I just assumed that was a given, but maybe I should have been more detailed.
![]()
Please Login or Register to view this content.
That was it. I'm sorry. Very new to VBA. No more error. But no empty "O2"
There is a 1 in L102 en a date in 03. When i push play in de VBA screen nothing happend
You Said > 1.... so just 1 is not enough to erase O3...
if you mean 1 or more, (meer dan 0 in plaats van 1), then change ""> 1" to "> 0"
That is it. Works like a charm and learnt something. Thanks.
Graag gedaan! Please remember to mark the thread as solved? Thanks![]()
One more question.
I copy paste the line in 13 lines and changed code to fit other lines and cells. But the other cells don't clear.
And this will run if i refresh excel. Is it possible to run it only in a macro?
Sorry two questions!![]()
What does that mean? I don't know where you put the code, but if you have put the code in a normal module, it SHOULD only run when you use the macro.And this will run if i refresh excel. Is it possible to run it only in a macro?
Can you also paste the code you tried for the other 13 lines? Then I can try to see what is wrong.
![]()
Please Login or Register to view this content.
Ok... are there numbers in rows 103, 104, etc? because your code is correct. However, a much simpler version:
Please provide a workbook if you still have problems. Include the 2 sheets, and the data that is in there when it is not working.![]()
Please Login or Register to view this content.
To Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need.
Remember to desensitize the data.
Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
Long, long story short:
Formula:
Please Login or Register to view this content.
and drag it down
I've ignored sheet name in formula.
This is it! Thanks. Dankjewel.
@KOKOSEK that formula only adds L102 and S102, not the cells in between. But it is a good idea if the O3 value can be put in the formula, we just don't know what the source of the data is.
Sorry of course:
Formula:
Please Login or Register to view this content.
and another of course, that we all day long guessing.....
@Frigide If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
Bedankt also for the rep!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks