View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default offset cell position when there is value in a selected cell


Range("A1").Offset(user_value-1).Value = Range("D2").Value

Is it meant to be dynamic, that is working out which ell in A2:G2 to copy to
A3, and what if there is more than one value in that range?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"kuansheng" wrote in message
ups.com...
Hi guys,

what i have is date in A1 to G1. In the following row, A2 to G2 i have
data on the amount of inventory that is in the store. If there exist a
value in any of the cell in B1 to B10. Let say there is a vaule 20 in
cell D2. This value 0f 20 will be place in cell offset from cell D2 by
a amount of offset entered by the user. Let say offset amount is 3. The

value of 20 will be automatically copied to cell A3(offset 1 row below
D2 to D3 and 3 column to the right of D3 to A3). Anyone could point me
to how this can be accomplish?


Befo


A B C D E
1 MON TUE WED THUR FRI


2 20


3


After:


A B C D E
1 MON TUE WED THUR FRI


2 20


3 20 <<<<<<<<Being offset from cell D2 by an offset value of
3


After:


A B C D E
1 MON TUE WED THUR FRI


2 20


3 20 <<<<<<<<offset value = 1