Multiply columns to 1

LeanneBG

Board Regular
Joined
Jun 20, 2016
Messages
157
Hi Experts!

I have been trying to figure out how to multiply 3 columns (column C, F and I) by 1 and paste as values -- up until last row but excluding the header since the header is text and will generate an error if i do this.

I tried recording the process of how i do it but i'm getting a numerous line items of code. I believe there's a shorter way to do it. Appreciate if anyone can suggest a shorter way. Thanks in advanceE
 
If it is that your values are Date/Time stored as text, then you might also try this method. This assumes that your dates are in D/M/Y format. If they would be M/D/Y format then change the FieldInfo array to Array(1, 3)

VBA Code:
Sub Convert_Values()
  Dim Col As Variant

  For Each Col In Split("C F I")  '<-List your columns here with spaces
    Columns(Col).TextToColumns DataType:=xlDelimited, Space:=False, Other:=False, FieldInfo:=Array(1, 4)
  Next Col
End Sub
IT WORKS!! Thanks everyone!! :D
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top