View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
[email protected] melinda.chase@gmail.com is offline
external usenet poster
 
Posts: 5
Default Copy values from multiple sheets

Never mind on jrow=0 thing. One of my other macros that works shows a
similar variable as being equal to 0. However, I'm still stumped. How
does the search function know to look for bold cells?
Cells.Find(What:="", After:=Range("C14"), LookIn:=xlFormulas,
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False, SearchFormat:=True).Activate
I see that it says SearchFormat:=True, but how does it determine the
format?
I'm wondering if this isn't the problem.


wrote:
I turned on screenupdating and it's not doing anything. It's just
sitting there. I don't know why it insists that jrow is equal to 0,
but that would explain why it doesn't do anything. It's all very odd.
I checked the sheets that the macro should be going to to copy, and
there are no blank cells formatted as bold.
Any more ideas?
Thank you so much for your time!
Melinda

Tom Ogilvy wrote:
you have
for jrow = 14 to Cells(Rows.Count, "A").End(xlUp).Row

if the activesheet has values in row 14 and below (14), I don't see how
jrow could have a value of zero.

Your code looks OK to me unless you have blank cells that are formatted as
bold.

Why not leave screenupdating turned on and see what your macro is doing.

--
Regards,
Tom Ogilvy



"Melinda" wrote in message
...
Hi Tom,
I changed the cell reference, and now the macro runs, but it pastes no
values. I'm sure I'm missing something easy. If I step into the macro
and
hover my cursor over Cells(jRow,12).Select, it shows jRow=0, instead of a
value in my range.
Any more ideas?
Thanks a lot!
Melinda

"Tom Ogilvy" wrote:

Range(Cells(jRow, 12)).Select
should be

Cells(jRow, 12).Select


--
Regards,
Tom Ogilvy

"Melinda" wrote:

Hello,
I'm having trouble copying values from multiple worksheets into my
summary
sheet. What I need to do is, look at the value in column C, go to the
worksheet with that name, find the bold cell, copy that value and paste
it
back in column L of the first sheet. I can do this for one cell, but
how do
I repeat it for each row in my summary table?
Below is my attempt at code. Any thoughts?

Sub FindBold()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim Rng As Range
Dim jRow As Long

For jRow = 14 To Cells(Rows.Count, "A").End(xlUp).Row
Worksheets(Range(Cells(jRow, 3)).Text).Activate
Cells.Find(What:="", After:=Range("C14"), LookIn:=xlFormulas,
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False, SearchFormat:=True).Activate
Selection.Copy
Sheets("BRIDGE").Select
Range(Cells(jRow, 12)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Next jRow
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub