Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Copy values from multiple sheets

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Copy values from multiple sheets

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Copy values from multiple sheets

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy values from multiple sheets

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Copy values from multiple sheets

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




  #6   Report Post  
Posted to microsoft.public.excel.programming
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


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUM VALUES on MULTIPLE SHEETS lotivbarjoh Excel Worksheet Functions 2 December 4th 07 05:28 PM
copy all and paste values for all sheets in a workbook cass calculator Excel Worksheet Functions 6 June 1st 07 02:58 PM
copy sheets with values only and NO link to old workbook Roundy Excel Programming 1 May 11th 06 07:14 PM
Lookup multiple values on multiple sheets RealGomer Excel Programming 1 June 7th 05 05:41 PM
How to get a sum of values from multiple sheets Ahmed Excel Programming 6 November 20th 04 11:37 AM


All times are GMT +1. The time now is 08:11 PM.

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

About Us

"It's about Microsoft Excel"