Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Gracie Hughes   on Sep 21 In MS Office Category.

  
Question Answered By: Jonathan Brown   on Sep 21

When I copied the code  from your
reply below into the VBE (because I hadn't saved it), several of the lines had
picked up extra spaces.

On the NextRow& line, there was an illegal space between Count). and End, then
another one between (xlUp) and .Row

On the PasteSpecial line, there was an illegal space between PasteSpec and
ial, and another between xlPasteValue and s,

When I removed the extra spaces it worked fine. I will post it again (with
slight revisions). Try again, and watch for any extra spaces the forum is adding
on its own.
Otherwise, I can email you a file directly with the code.

Sub AAAA()
Dim NextRow As Long
NextRow& = Range("AJ" & Rows.Count).End(xlUp).Row + 1
If NextRow& < 51 Then NextRow& = 51
Range("F6:F25").Copy
Range("AJ" & NextRow&).Select
Selection.PasteSpecial Paste:=xlPasteValues, _
Transpose:=True
End Sub

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Selecting the row below Or get search suggestion and latest updates.


Tagged: