macro help

  • Thread starter Thread starter Raan
  • Start date Start date
R

Raan

Hi All,


3*2 3*3
3*2 3*4
3*4 3*4
3*2 3*2
3*5 3*5
3*4 3*4
3*4 3*4
3*5 3*5
3*5 3*5
3*4 3*4
3*4 3*4
3*4 3*4
3*2 3*2
3*3 3*3


I have following kind of data i want to convert the above column into
following , how can i do that

=3*2 =3*3
=3*2 =3*4
=3*4 =3*4
=3*2 =3*2
=3*5 =3*5
=3*4 =3*4
=3*4 =3*4
=3*5 =3*5
=3*5 =3*5
=3*4 =3*4
=3*4 =3*4
=3*4 =3*4
=3*2 =3*2
=3*3 =3*3

Can i do it using the help of macro ?

Regards,
Raan
 
Sub multiply()
For Each cell In Selection
cell.Value = "=" & cell.Value
Next cell
End Sub


Gord Dibben MS Excel MVP
 
Hi Gord,

Thanks .

Can i also do it using formula.. something like = "=" & b23.

Some pointers for excel programming would be very helpful.

Rgds,
Raan
 
Not sure what you want to do here but maybe just the worksheet formula

Where A1 contains the string B23

=INDIRECT(A1) will return what's in B23

Pointers can be found at several places.

David McRitchie's "getting started" site is pretty good.

http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin shows where to place the different types of code.

http://www.rondebruin.nl/code.htm

Tushar Mehta's "beyond the macro recorder" has some good pointers.

http://www.tushar-mehta.com/excel/vba/beyond_the_macro_recorder/index.htm

For a good list of books on VBA see Debra Dalgleish's site.

http://www.contextures.on.ca/xlbooks.html


Gord
 
Back
Top