Thread: Macro Question
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
MT_Netols[_2_] MT_Netols[_2_] is offline
external usenet poster
 
Posts: 1
Default Macro Question


Charles, your code works perfectly, thanks a lot. Not to just have you
cranking out code for me, but I was wondering if it could be modified
slightly. I'd like to break Sheets 1-3 into buys and sells, so the
stocks are split into columns A & H with the prices in D & K. What
would I need to change in the code to make the macro go through one
comparison of Sheet 4 column A to Sheets 1-3 column A, and then again
for Sheet 4 column A to Sheets 1-3 column H? Is it possible to copy
the code in a second time and just change this line:

Set tCell = Sheets(cnt2).Columns("A").Find(sVal, Range("A1"),
xlFormulas, xlWhole, xlByRows, xlNext, False)

to:

Set tCell = Sheets(cnt2).Columns("H").Find(sVal, Range("H1"),
xlFormulas, xlWhole, xlByRows, xlNext, False)

or will that not work?

Thanks for all your help,

Matt


--
MT_Netols
------------------------------------------------------------------------
MT_Netols's Profile: http://www.excelforum.com/member.php...o&userid=37665
View this thread: http://www.excelforum.com/showthread...hreadid=572758