View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Help creating a Macro or Formula

Put this macro in a regular code module and assign it to the button:

Sub paste()
Dim r As Long
r = Sheet2.Range("A5").Value
Sheet2.Range("G" & r).Value = Sheet1.Range("G35").Value
End Sub

Cheers...Mike F
" wrote in
message ...
I am trying to convert a Quattro Pro formula attached to
a button that is as follows {blockvalues sheet1:G35,@@
("K10")}. This formula copies the value of Cell G35
located in sheet1 and paste the value in Sheet2 in a
column determined by Cell K10. The formula in Cell K10
is ="sheet2:G"&A5. As the entry in Cell A5 is changed so
does the cell address for the values to be pasted.
Example Cell A5 has a value of 1
Cell K10 will show an address of Sheet2:G1
If Cell A5 has a value of 2
Cell K10 will show Sheet:G2, etc.
The trouble that I am having is how to tell the macro or
formula to copy cell G35 then go to cell K10 to find out
where to paste the results in Sheet2 column G.