Whilst writing a macro I accidently used a range variable instead of the Cells command which acted like an Offset comand.
Can anyone explain how this works
![]()
Please Login or Register to view this content.
Whilst writing a macro I accidently used a range variable instead of the Cells command which acted like an Offset comand.
Can anyone explain how this works
![]()
Please Login or Register to view this content.
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assistedor failed to assist you
I welcome your Feedback.
Hi Mudraker.
It seems that Excel is interpreting your code to be an Offset much like you can use Cells(1,1) instead of Cells(1,1).Value. It's not something I have come across before.
I don't quite follow your code. What is it supposed to do because when i edit it to your original intentin it does nothing. You don't seem to set the Target.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Being a worksheet change event macro the target range is set by the cells that are changed on the sheet.
I have a need to paste multiple cells into the sheet which all pasted cell needs to be tested for certain data. This is why I am using the For loop.
The posted code is only a fraction of the total code & was just to show the reason for my query. My actual code does a lot with the pasted data depending on the column it is in.
This part of the code was to subtract a cell value from another cell and place the result into column f of the same row.
Your explanation is about as good as I could come up with & like you I have never heard of it before.
I see now, I didn't relise you were pasting values into the cells.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks