ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB Help to Look at Next Row (https://www.excelbanter.com/excel-programming/345081-vbulletin-help-look-next-row.html)

Jbucks007

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


sebastienm

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




All times are GMT +1. The time now is 02:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com