Hello to all,
is possible with vba:
if cell A:A contains "conteggio" (count)
next cell B copy B-1
next cell C copy C-1
see Attachment
john
Hello to all,
is possible with vba:
if cell A:A contains "conteggio" (count)
next cell B copy B-1
next cell C copy C-1
see Attachment
john
![]()
Please Login or Register to view this content.
Hi ikboy thanks for the reply, your macro not work
Try....
![]()
Please Login or Register to view this content.
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
― Robert A. Heinlein
I Cr76 work well.
A change for cell 47 does not have to be entered
Just change Range() to... (add -1 so that last row is ignored)
![]()
Please Login or Register to view this content.
Hi CK76 work well
check lines 275/276 in new attached
275 is missing
276 is not needed
changed in macro "conteggio"> "totale"
You have - 2 in your range. Should be - 1.
oops
Thanks CK76 it works
thank you again
john
Hi,
if not found here it gives error.![]()
Please Login or Register to view this content.
For Each cel In Range("A2:A" & Cells(Rows.Count, "A").End(xlUp).Row - 1)
is it possible to add if it does not find an invalid file message and exits the macro?
Hello maybe I explained myself wrong?
Yes, please give more detail. It isn't clear to me what exactly is needed.
And FYI, I don't check forum on weekends and on holidays (Monday was Canadian stat holiday).
Hi CK76 your macro if there is a subtotal in the file works well
if it doesn't contain a subtotal it gives error here
For Each cel In Range("A2:A" & Cells(Rows.Count, "A").End(xlUp).Row - 1)
Is possible an message box for warnin error?
? If error is given there, then it isn't subtotal that's issue.
But your A column not having any value(s) to loop over that's causing issue. Add if statement that wrap For Each loop.
So that loop executes only when there's enough data.
Ex:
![]()
Please Login or Register to view this content.
Hi CK76 tanks you, your macro work well:
in the meantime I did this:![]()
Please Login or Register to view this content.
for you is correct?![]()
Please Login or Register to view this content.
I prefer to remove exit sub line and nest your error step in If Err.Number <> 0 then...
Otherwise looks fine
Last edited by CK76; 02-18-2020 at 03:18 PM.
Thanks for the info CK76.
A greeting and thanks again.
xam
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks