Thread: Spaces in VBA
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default Spaces in VBA

Norman, Ian, Dave
Thanks for your help with this. Otto
"Otto Moehrbach" wrote in message
...
Excel 2002, WinXP
Say that I have two cells, A1 & B1, with entries in each. I want to
concatenate those two values in, say C1. But I want a number of spaces
between them. That's easy to do if the number of spaces is fixed. But I
have a situation where the number of spaces is a variable, say NumSpaces.
How do I code the concatenation? Something like:
Range("C1").Value=[A1].Value & NumSpaces??? & [B1].Value
Thanks for your help. Otto