Excel Macro to Insert the contents of one column to other
Try this code - just be sure you're on the sheet you need to change things on
before using it - it works on the currently active/chosen sheet.
Sub CombineTemps()
Dim anyCell As Range
ActiveSheet.UsedRange.Select
For Each anyCell In Selection
If UCase(anyCell.Value) = "TEMP" Then
anyCell.Value = anyCell.Value & ": " & anyCell.Offset(0, 1).Value
anyCell.Offset(0, 1) = ""
End If
Next
End Sub
"Dhawal" wrote:
That Helps. But the data is uncertain so I have temp in many different
columns. There is more data below temp. I need some help with that.
Regards,
Dhawal
Fred Smith wrote:
The easiest way would be to simply record the macro. Start the macro recorder
(ToolsMacros...), then execute the commands you need. Stop the recorder, and
save the macro with whatever name you want.
--
Regards,
Fred
"Dhawal" wrote in message
ups.com...
Hello,
I have a worksheet in which my data is arranged as per temp. I have
Temp in one column and the corresponding value in the other. I need to
inser
For eg.
I have
temp 25C in two adjacent columns
i have to make it Temp: 25C
and remove the 25C from that column.
Can I get some help with the Excel Macro for the same.
Dhawal...
|