Formatting columns.

  • Thread starter Thread starter Tom Walat
  • Start date Start date
T

Tom Walat

Using Excel 2000:
Looking for a macro to adjust the sample chart below. Basically, it
should select the third column and move what it finds there next to
the item in the first cell but place it in parentheses.

Original chart:
Worcester State++++0-0++++2-0
Westfield State++++0-0++++3-1
Fitchburg State++++0-0++++2-1
Massachusetts College++++0-0++++1-1

End result:
Worcester State(2-0)++++0-0++++
Westfield State(3-1)++++0-0++++
Fitchburg State(2-1)++++0-0++++
Massachusetts College(1-1)++++0-0++++

Thanks for any help.

- Tom
 
If "Worcester State" is in cell A1 and "2-0" is in cell B1:

in cell C1

=concatenate(A1,"(",B1,")")

not sure what all the + signs are for, but maybe this will still give you an idea...

Rita
 
Rita:
Thank you.
(I use the plus signs to demarcate the columns. )
- Tom
 
Just following up my own thread since I'm not sure how to use
CONCATENATE in a macro. Maybe someone else will find it useful.
Here's the macro I used to format when the item in the first
row was selected.

Public Sub Records()
Dim cell As Range
For Each cell In Selection
With cell
.Value = .Text & " (" & .Offset(0, 2).Text & ")"
.Offset(0, 2).Resize(1, 2).ClearContents
End With
Next cell
End Sub

- Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top