vba - Data Manipulation In Excel -


fairly easy 1 hope.

if have column of values in sheet, how can set values equal variable can work in vba.

for instance column has 100 weight values , column b has 100 height values. in vba script want set "weight" values in column , height b. , bmi = weight * height , write bmi column c.

i know can example formulas actual task i'll looping few hundred times , not know column index value.

thanks!

edit: specify further, columns randomly arranged. won't able use relative cell references. i'll finding column, naming working data in reference column , finding next column , doing same.

edit 2: think answers focusing on achieving result specified in example rather implementing process trying describe.

this should enough see how simple task can done :

sub user3033634() dim lastrow integer  sheets("sheet1")     lastrow = .cells(rows.count).end(xlup).row     = 1 lastrow         .cells(i, "c") = .cells(i, "a") * .cells(i, "b")         '.cells(i, 3) = .cells(i, 1) * .cells(i, 2)     next end  end sub 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -