ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   help in writing a macro (https://www.excelbanter.com/excel-programming/291215-help-writing-macro.html)

slim[_2_]

help in writing a macro
 
I'm a newbie to VBA and I'm trying to write a macro hopefully some of guys
can help me out.

In this spreadsheet, I would have two worksheets: The main sheet (sheet 1),
and the sheet that only has a list of numbers (sheet 2).

Sheet 2 has a list of about 25 numbers going down column A ie: A1= 45100 ,
A2=45200, A3=64250, etc...

When I execute this macro, what it would do is go to cell B5 of Sheet 1,
then place the first value of the list of numbers from Sheet 2 into B5(Sheet
1), then perform a manual calculation (F9 key), and save the file with
filename of the text value in B5. After the save, it would loop back again
and advance to the 2nd value of the list of numbers..etc.. until the end of
the list.

I would greatly appreciate if anyone could help me with this task.



acw[_2_]

help in writing a macro
 
Sli

This should get you started

Ton

Sub aaa(
Sheets("sheet2").Selec
Range("a1").Selec
While Not IsEmpty(ActiveCell
Sheets("sheet1").Range("b5") = ActiveCell.Valu
ActiveWorkbook.SaveAs FileName:=ActiveCel

ActiveCell.Offset(1, 0).Selec
Wen
End Su

----- slim wrote: ----

I'm a newbie to VBA and I'm trying to write a macro hopefully some of guy
can help me out

In this spreadsheet, I would have two worksheets: The main sheet (sheet 1)
and the sheet that only has a list of numbers (sheet 2)

Sheet 2 has a list of about 25 numbers going down column A ie: A1= 45100
A2=45200, A3=64250, etc..

When I execute this macro, what it would do is go to cell B5 of Sheet 1
then place the first value of the list of numbers from Sheet 2 into B5(Shee
1), then perform a manual calculation (F9 key), and save the file wit
filename of the text value in B5. After the save, it would loop back agai
and advance to the 2nd value of the list of numbers..etc.. until the end o
the list

I would greatly appreciate if anyone could help me with this task





All times are GMT +1. The time now is 09:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com