Copy & Paste

Harley78

Active Member
Joined
Sep 27, 2007
Messages
372
Office Version
  1. 365
Platform
  1. Windows
I am trying to Copy every other Cell in Row 1 and paste it into another worksheet, transposed starting in A2. Just wondering if someone could help me with what I am missing. What I have so far

Range("A2").Select
Sheets("Configuration Sheet1").Select 'SHEET 1
Range("H1,J1,L1,N1,P1,R1,T1,V1,X1,Z1,AB1,AD1,AF1,AH1,AJ1,AL1,AN1,AP1,AR1,AT1,AV1,AX1,AZ1, BB1, BD1,BF1,BH1,BJ1,BL1,BN1,BP1,BR1,BT1,BV1,BX1,BZ1, CB1, CD1,CF1,CH1,CJ1,CL1,CN1,CP1,CR1,CT1,CV1,CX1,CZ1,DB1, DD1,DF1,DH1,DJ1,DL1,DN1,DP1,DR1,DT1,DV1,DX1,DZ1,EB1, ED1,EF1,EH1,EJ1,EL1,EN1,EP1,ER1,ET1,EV1,EX1,EZ1,FB1, FD1,FF1,FH1,FJ1").Select
Range("FJ1").Activate
Selection.Copy
Sheets("COMBINED CONFIGURATION").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Is there anything in the "between" cells ? I1, K1, M1, O1 etc.. ?

Is there some fundamental difference between the ones you want to copy and the ones you don't (other than the fact they are every other row)...

maybe the ones you want are numbers, while the others are text...
something like that...
 
Upvote 0
Example, H1 has the configuration model No. and I1 has the cost for this configuration.

H1 e.g. 5410-6020(2)M-UT but could and of course I1 is dollar amount.

Hope that helps a little

 
Upvote 0
So it's every other cell from H to FJ. H J L N P etc... FJ are all TEXT, where the inbetween I K M O Q etc.. FI are Numbers right?

Give this a shot

Sheets("Configuration Sheet1").Range("H1:FJ1").SpecialCells(xlCellTypeConstants, 2).Copy
Sheets("COMBINED CONFIGURATION").Range("A2").PasteSpecial _
Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
 
Upvote 0
that worked perfectly! thanks Jon


So to do the same for the Pricing eh? Just by changing the H to I and FJ to FK
 
Last edited:
Upvote 0
No.

the specialcells command is what told it to get the text...

so change
SpecialCells(xlCellTypeConstants, 2)

to
SpecialCells(xlCellTypeConstants, 1)

that will make it get numbers instead...
 
Upvote 0

Forum statistics

Threads
1,215,132
Messages
6,123,227
Members
449,091
Latest member
jeremy_bp001

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top