ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range().Select Not Working (https://www.excelbanter.com/excel-programming/285222-re-range-select-not-working.html)

Chip Pearson

Range().Select Not Working
 
Bob,

Just use


Cells(iRow, 13).Select


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Bob Ewers" wrote in
message
...
I'm trying to combine two tables. Each has common elements but

I want to add new items from one table to the other. The code I
have so far, search through the tables and inserts rows where
necessary. What I'm having trouble with is copying formulas to
the new rows. The code seems to get hung up on the
Range(...).Select line. If I hard code the cell address it
works, but that doesn't really help me. Any help will be greatly
appreciated.

If Cells(jRow, "z") < Cells(iRow, "a") Then
Cells(iRow, "a").Resize(1, 17).Insert xlShiftDown
Cells(iRow, "a") = Cells(jRow, "z")
Cells(iRow - 1, "m").Resize(1, 5).Copy
Range(Cells(iRow, 13)).Select
ActiveCell.PasteSpecial




Bob Ewers

Range().Select Not Working
 
Chip,

Nothing like making things more complicated. I'm using FillDown now at the end of the procedure. But thanks for your help.

Bob


All times are GMT +1. The time now is 04:15 PM.

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