LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Bill Kuunders
 
Posts: n/a
Default

ActiveCell.Value = myrange(cell.Row, 1).Value & " " & myrange(1,
cell.Column).Value

by the way

the above two lines need to be on one line

with a space between myrange(1, and cell. Column

Regards
Bill K

"Bill Kuunders" wrote in message
...
I assume you want that with a space between the two.
The macro is actually shorter ( :))

Have fun!!

Sub concat()
Dim myrange As Range
Set myrange = Range("a1:d5")
Range("h1").Activate
For Each cell In myrange
If cell.Value = "x" Then
ActiveCell.Offset(1, 0).Activate
ActiveCell.Value = myrange(cell.Row, 1).Value & " " & myrange(1,
cell.Column).Value
End If
Next
End Sub


Greetings from New Zealand
Bill K

"Lynn Bales" wrote in message
...
Bill - One thing I can't figure out. In one of the sps I can use this on,
I
need the two values concatenated into one column. So can you tell me what
the
code would be to create a single column with what you already have
written?
Thanks! Lynn

"Bill Kuunders" wrote:


You will have to change the range of myrange and the addres "H1" where
the
reult is listed.
This macro worked for me.
Good luck


Sub test()
Dim myrange As Range
Set myrange = Range("a1:d5")
Range("H1").Activate
For Each cell In myrange
If cell.Value = "x" Then
ActiveCell.Offset(1, 0).Activate
ActiveCell.Value = myrange(cell.Row, 1).Value
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = myrange(1, cell.Column).Value
ActiveCell.Offset(0, -1).Select
End If
Next
End Sub


--
Greetings from New Zealand
Bill K


"Lynn Bales" wrote in message
...
I have data which consists of a row with an identifier and several
columns
which are options for the identifier that contain an X when it's
selected.
It
looks like this

number option1 option2 option3
1234 X X
2345 X X

What I'm trying to get is a single column of

1234-option1
1234-option2
2345-option2
2345-option3

I've tried to use transpose and concatenate but it's a large
spreadsheet
so
it's still very manual. Any ideas or macros that would help me
automate
this
process would be VERY appreciated.










 
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
How do i make a formula reference the last entry of a column Knightrider Excel Worksheet Functions 2 June 1st 05 04:29 AM
how do I make a new spread sheet pop up, based on an entry in a c. jpryce Excel Discussion (Misc queries) 1 April 15th 05 07:57 PM
How to make Unique coloumn in Excel sheet ? V JHANJI Excel Discussion (Misc queries) 2 March 9th 05 10:04 AM
in excel - i have a row of cells i need to make 'unique' and do n. gtoffice Excel Worksheet Functions 1 January 13th 05 06:54 PM
How do i make journal entry in excel? Natali Excel Worksheet Functions 2 January 5th 05 06:09 PM


All times are GMT +1. The time now is 10:10 PM.

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

About Us

"It's about Microsoft Excel"