ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel Macro to Insert the contents of one column to other (https://www.excelbanter.com/excel-discussion-misc-queries/112378-excel-macro-insert-contents-one-column-other.html)

Dhawal

Excel Macro to Insert the contents of one column to other
 
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...


Fred Smith

Excel Macro to Insert the contents of one column to other
 
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...




Dhawal

Excel Macro to Insert the contents of one column to other
 
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...



Dhawal

Excel Macro to Insert the contents of one column to other
 
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...



Fred Smith

Excel Macro to Insert the contents of one column to other
 
OK. Post the macro you have, then tell us what you need changed. That will be a
lot quicker than having everyone guess what your spreadsheet looks like.

--
Regards,
Fred


"Dhawal" wrote in message
oups.com...
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...





JLatham

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...





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com