Home |
Search |
Today's Posts |
#10
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i make a formula reference the last entry of a column | Excel Worksheet Functions | |||
how do I make a new spread sheet pop up, based on an entry in a c. | Excel Discussion (Misc queries) | |||
How to make Unique coloumn in Excel sheet ? | Excel Discussion (Misc queries) | |||
in excel - i have a row of cells i need to make 'unique' and do n. | Excel Worksheet Functions | |||
How do i make journal entry in excel? | Excel Worksheet Functions |