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, 2022 in Others by Kithuzzz
• 38,010 points
423 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, 2022 by narikkadan
• 63,420 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, 2022 in Others by Edureka
• 13,670 points
724 views
0 votes
1 answer

Creating sheets with names in column B and assigning data to each sheet for particular name

after the first occurrence of Set sht = ...READ MORE

answered Feb 13, 2023 in Others by narikkadan
• 63,420 points
503 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, 2022 in Others by Edureka
• 13,670 points
389 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, 2022 in Others by narikkadan
• 63,420 points
863 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,740 points
902 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
3,222 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, 2022 in Others by gaurav
• 23,260 points
514 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, 2022 in Others by Edureka
• 13,670 points
756 views
0 votes
1 answer

Convert column in excel date format (DDDDD.tttt) to datetime using pandas

Given # s = df['date'] s 0 ...READ MORE

answered Oct 2, 2022 in Others by narikkadan
• 63,420 points
2,787 views
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, 2022 in Others by narikkadan
• 63,420 points
290 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