VBA for generating units table

ajaysomasi

New Member
Joined
Mar 6, 2017
Messages
25
Hi everyone

I'm looking for VBA code to develop a Units table as an output as explained below.. I have a lot of units to organize, hence a code will help solve my problem quickly.. Appreciate your help..

I have units in the following manner:

1 m = 100 cm
1 m = 1000 mm
1 m = 0.001 km

I want a table that lists out the conversion for all possible combinations.. The output for the above input will look like this:

Original unitConversionTarget unit
m100cm
m1000mm
m0.001km
cm0.01m
cm10mm
cm0.00001km
mm0.001m
mm0.1cm
mm0.000001km
km1000m
km1000000mm
km100000cm
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

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