Can someone please tell me why this code is failing?
*edit* I = 1 to .rows.count and not 8![]()
Please Login or Register to view this content.
Can someone please tell me why this code is failing?
*edit* I = 1 to .rows.count and not 8![]()
Please Login or Register to view this content.
Last edited by stevoDE; 06-29-2017 at 11:48 AM.
Please ignore this reply.
Regards
Special-K
Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.
You can't resize <1 and you can't offset -2 from the second column; is what immediately "pops out"![]()
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
Darn, I wish I'd kept my reply now![]()
Hi,
You need Cells, not Range if you want to pass a row and column argument like that, and the size and offset are wrong.
Did you mean to start your loop from B15?
Don
Please remember to mark your thread 'Solved' when appropriate.
@ Special-K You can reinstate your reply - we won't care and we'd like to see it![]()
I'm offsetting -2 rows from the last used row starting from the bottom, not from the second column. I'm not sure what you mean about resize <1.
I have edited my code as 'i' should have been 1. I'm basically trying to check if the value in column H is blank. If it is not, I want to copy that row from column B to H i.e. H resized by -7 columns.
????![]()
Please Login or Register to view this content.
I was wrong about the column offset as it's, obviously, a row offset.
Offset and resize do not work the same way, Resize(0,-7) is
defining a zero rows and negative 7 columns - it can never was:|
Last edited by xladept; 06-29-2017 at 12:03 PM.
With you now, I wasn't aware you couldn't resize to the left.
The above doesn't seem to do what I'm after and that's probably because I didn't mention that I want to copy all rows (equivalent of holding down the CTRL key and copying). The above code only copies the last row where the value in column H is not blank.
Try this:
![]()
Please Login or Register to view this content.
Please ignore.
Last edited by stevoDE; 06-30-2017 at 06:20 AM.
Try:
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks