# Loop and offset problem

1. ## Loop and offset problem

Hi all,

it seems that im in trouble here, my
``Please Login or Register  to view this content.``
won't paste value even though .range("i48") and shares 2 is value.

furthermore my whole offset function is bad. egenkapital.offset(0,1) doesn't work either. but the plan was that it would paste value and move on to the next column and stop when ""

thanks

``Please Login or Register  to view this content.``

2. ## Re: Loop and offset problem

What is BV?

Have you set BV = worksheet("Sheet1") or something similar

3. ## Re: Loop and offset problem

I have this one, do I need to write set in front of it?
``Please Login or Register  to view this content.``
thanks for looking into this :D

best regards André

4. ## Re: Loop and offset problem

``Please Login or Register  to view this content.``

5. ## Re: Loop and offset problem

I've tried that now, it still won't do it.
basically I what it to know that
``Please Login or Register  to view this content.``
is the cell where it drops off the first calculated value.
afterwords it offsets both the
``Please Login or Register  to view this content.``
to
``Please Login or Register  to view this content.``
and the other statements ( egenkapital, udstedetaktier and so on. but my lines
``Please Login or Register  to view this content.``
is a 438 error

thanks again

6. ## Re: Loop and offset problem

My mistake I misspelled in the line, now its just the offset function that runs a 438 error :D

7. ## Re: Loop and offset problem

Ok Lets go back a bit.

What Do you understand this statement to mean?

A = .Offset(0, 1) I guess you think it means BV.offset(0,1) ................ Wrong.

With your code it actual means: Sheets(Ticker).offset(0,1) which is impossible. You offset from a cell or a range not from a Sheet.

You Said:
``Please Login or Register  to view this content.``
from that point onwards "." means "Sheets(Ticker)." so
``Please Login or Register  to view this content.``

8. ## Re: Loop and offset problem

True, I didn't think it would offset the sheet.
Im trying to offset egenkapital and udstedsaktier in one sheet and BV in another, horizontal and vertical respectively.
so take the 2 values (egenkapital and udstedtaktier), calculate it, paste into another sheet, then offset egenkapital and udstedtaktier and the BV, so the next calculation can proceed in now BV=sheets("valuation").range("n9"), really hope it makes sense, and sorry for my lack of knowledge

thanks for helping

9. ## Re: Loop and offset problem

Try This

``Please Login or Register  to view this content.``

10. ## Re: Loop and offset problem

Great, it works perfectly!!
very grateful, thanks

There are currently 1 users browsing this thread. (0 members and 1 guests)