Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Help to Look at Next Row
i created a formula in a cell that when populated returns values i certain fields. however my data is in a row and i need a macro that will look in say a return the value to a1, then print, then look at a3 return the value t a1 then print. does that sound doable? thanks, jaso -- Jbucks00 ----------------------------------------------------------------------- Jbucks007's Profile: http://www.excelforum.com/member.php...fo&userid=2866 View this thread: http://www.excelforum.com/showthread.php?threadid=48332 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Help to Look at Next Row
Hi,
Try the following: '---------------------------------- Sub test() Dim wsh As Worksheet Dim rgDest As Range, cell As Range, rgFrom As Range Set wsh = ActiveSheet Set rgFrom = wsh.Range("A2:A10") 'Where to look Set rgDest = wsh.Range("A1") 'where to put the value 'For each cell in rgFrom, set the value in rgDest and print For Each cell In rgFrom.Cells rgDest.Value = cell.Value wsh.PrintOut Debug.Print cell.Value Next End Sub '------------------------------------------------------------------- -- Regards, Sébastien <http://www.ondemandanalysis.com "Jbucks007" wrote: i created a formula in a cell that when populated returns values in certain fields. however my data is in a row and i need a macro that will look in say a2 return the value to a1, then print, then look at a3 return the value to a1 then print. does that sound doable? thanks, jason -- Jbucks007 ------------------------------------------------------------------------ Jbucks007's Profile: http://www.excelforum.com/member.php...o&userid=28661 View this thread: http://www.excelforum.com/showthread...hreadid=483320 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|