Convert Feet to meters in excel with macro for entire column

0 votes

I don't program. I'm an avionics technician attempting to change data coming from our jets. One of the macros I created removes all extraneous columns and adds columns and values to it so that it displays correctly as a kml. However, I cannot find a solution to change the macro for thousands of cells from feet to meters.

Sub sbVBS_To_Delete_Specific_Multiple_Columns()
Sheets("GRT Flight Data    Log_raw").Range("A:B,H:I,K:L,P:P,AB:AH,AK:AN,AQ:AQ,AT:AT,AZ:BJ").EntireColumn.Delete

Columns("G:G").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

Range("G1").Value = "AppendDataColumnsToDescription"

Range("G2:G363").Value = "Yes"

Range("F1").Value = "IconAltitude"

Columns("H:H").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

Range("H1").Value = "IconAltitudeMode"

Range("H2:H363").Value = "MSL"

Columns("I:I").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

Range("I1").Value = "Icon"

Range("I2:I363").Value = "222"

Columns("J:J").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

Range("J1").Value = "IconHeading"

Range("J2:J363").Value = "line-0"

Columns("K:K").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

Range("K1").Value = "IconScale"

Range("K2:K363").Value = ".5"

Columns("L:L").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

Range("L1").Value = "IconLineColor"

Range("L2:L363").Value = "Cyan"

Columns("M:M").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

Range("M1").Value = "LineStringColor"

Range("M2:M363").Value = "Lime"

End Sub
Oct 27 in Others by Kithuzzz
• 20,660 points
27 views

1 answer to this question.

0 votes

You can convert Feet to Kilometers using the CONVERT function:

=CONVERT(A2,"ft","km")

enter image description here

In VBA you can call it a worksheet function:

Application.WorksheetFunction.Convert(.Value, "ft", "km") 
answered Oct 27 by narikkadan
• 37,660 points

Related Questions In Others

0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

Feb 17 in Others by Edureka
• 13,640 points
109 views
0 votes
0 answers

MS EXCEL: Convert (Height) Decimal Feet & Inches to Inches Only

Using MS Excel (2010), I would like ...READ MORE

Feb 10 in Others by Edureka
• 13,640 points
96 views
0 votes
1 answer

How to print an Excel Sheet using VBA with Nitro PDF Creator in Excel 2016

you can use the built-in excel facilities ...READ MORE

answered Sep 24 in Others by narikkadan
• 37,660 points
119 views
0 votes
1 answer

How to create a drop-down in excel with custom values

You can accomplish that using code rather ...READ MORE

answered Sep 25 in Others by narikkadan
• 37,660 points
67 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,720 points
451 views
0 votes
1 answer

How to load file to Excel Power query from SFTP site

Currently, I don't think there is a ...READ MORE

answered Dec 3, 2018 in Power BI by Upasana
• 8,620 points
2,218 views
0 votes
1 answer

Using VBA Excel to create a gramatically correct list

The Excel AND function is a logical ...READ MORE

answered Feb 9 in Others by gaurav
• 22,040 points
69 views
0 votes
2 answers

How to copy a formula horizontally within a table using Excel VBA?

Hi so basically, create an adjacent column ...READ MORE

answered Feb 16 in Others by Edureka
• 13,640 points
205 views
0 votes
1 answer
0 votes
1 answer

Shortcut to Apply a Formula to an Entire Column in Excel

Try double-clicking on the bottom right hand ...READ MORE

answered Oct 29 in Others by narikkadan
• 37,660 points
40 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP