Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"