Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 536
Default CONCATENATE code

I get a Type Mismatch error with this code.
Where I want to start at cell A8 to the last entry in col A and produce the results to col H, H8 and down.

Then code to copy paste special values H8 to end of column in place.

Sub ConcTestx() 'Type Mismatch error
Dim LastRow As Long
Dim Ws As Worksheet

Set Ws = Sheets("Sheet1")
LastRow = Ws.Range("A8:A" & Range("A" & Rows.Count).End(xlUp).Row)

Ws.Range("H8:H" & LastRow).Formula = "=A2&B2&C2&D2&E2&F2&G2"
'paste special values in place here
End Sub

Thanks,
Howard
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default CONCATENATE code

hi Howard,

Sub ConcTestx()
Dim LastRow As Long
Dim Ws As Worksheet

Set Ws = Sheets("Sheet1")
LastRow = Ws.Range("A" & Ws.Rows.Count).End(xlUp).Row

Ws.Range("H8:H" & LastRow).Formula = "=A2&B2&C2&D2&E2&F2&G2"
Ws.Range("H8:H" & LastRow) = Ws.Range("H8:H" & LastRow).Value
End Sub

isabelle

Le 2013-02-10 21:55, Howard a écrit :
I get a Type Mismatch error with this code.
Where I want to start at cell A8 to the last entry in col A and produce the results to col H, H8 and down.

Then code to copy paste special values H8 to end of column in place.

Sub ConcTestx() 'Type Mismatch error
Dim LastRow As Long
Dim Ws As Worksheet

Set Ws = Sheets("Sheet1")
LastRow = Ws.Range("A8:A" & Range("A" & Rows.Count).End(xlUp).Row)

Ws.Range("H8:H" & LastRow).Formula = "=A2&B2&C2&D2&E2&F2&G2"
'paste special values in place here
End Sub

Thanks,
Howard

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 536
Default CONCATENATE code

On Sunday, February 10, 2013 6:55:32 PM UTC-8, Howard wrote:
I get a Type Mismatch error with this code.

Where I want to start at cell A8 to the last entry in col A and produce the results to col H, H8 and down.



Then code to copy paste special values H8 to end of column in place.



Sub ConcTestx() 'Type Mismatch error

Dim LastRow As Long

Dim Ws As Worksheet



Set Ws = Sheets("Sheet1")

LastRow = Ws.Range("A8:A" & Range("A" & Rows.Count).End(xlUp).Row)



Ws.Range("H8:H" & LastRow).Formula = "=A2&B2&C2&D2&E2&F2&G2"

'paste special values in place here

End Sub



Thanks,

Howard


Thank you, Isabelle,

Works perfect!
I seem to always struggle to get away from Select Copy Paste Special Values.

Much appreciated

Regards,
Howard
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
ron de bruins code won't concatenate Theo Excel Programming 9 April 22nd 09 01:41 AM
Concatenate PAL Excel Worksheet Functions 2 December 5th 08 07:36 PM
VB code to concatenate 100+ cells LJones[_3_] Excel Programming 3 February 1st 06 06:43 PM
post code & suburb concatenate varun Excel Discussion (Misc queries) 3 December 14th 05 09:18 AM
I know how to concatenate ,can one de-concatenate to split date? QUICK BOOKS PROBLEM- New Users to Excel 1 July 26th 05 05:07 PM


All times are GMT +1. The time now is 09:27 AM.

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

About Us

"It's about Microsoft Excel"