[Solved] Fill a cell and copy a range to another worksheet
Posted: Mon Jul 09, 2018 6:43 am
Dear All,
I need a simple macro, which can not be recorded by a macro recorder because it covers two different workbooks. I've been looking around for a while but I could not find much useful solutions on web.
I have a workbook lets say named FPST, which is given its name in cell A2. I fill cell B2 (only with numbers from 1 to 4 or 1to 10) in its first sheet then I copy the results in the second sheet from AW1:BA2680.
And then I insert (past special) these results as values in another workbook named according to cell A2 and "_01". So I need to name the latter workbook this way [what is written in A1]&"_"&01
I could not find much similar things on web. Is that because this is a very simple question and I'm the only one who can't figure it out, or is this something one can not do by macros?
what I need is a macro which does
1)Type numbers, which are given as code, into Sheet1.B2
2)Create a new file named [what is written in A1]&"_"&01, lets say "FPST_01"
3)Copy from workbook "FPST" Sheet2.AW1:BA2680. to "FPST_01" Sheet1.A1:E2680 .
4)While pasting these copied data, if B2 of first sheet equals to 1, macro should paste data to A1:E2680, BUT, if B2 equals to 2 then it should paste to F1:J2680 if B2 equals to 3 then macro should paste data to K1:O2680.
Is there anyone who has an idea about these 4 questions above?
I need a simple macro, which can not be recorded by a macro recorder because it covers two different workbooks. I've been looking around for a while but I could not find much useful solutions on web.
I have a workbook lets say named FPST, which is given its name in cell A2. I fill cell B2 (only with numbers from 1 to 4 or 1to 10) in its first sheet then I copy the results in the second sheet from AW1:BA2680.
And then I insert (past special) these results as values in another workbook named according to cell A2 and "_01". So I need to name the latter workbook this way [what is written in A1]&"_"&01
I could not find much similar things on web. Is that because this is a very simple question and I'm the only one who can't figure it out, or is this something one can not do by macros?
what I need is a macro which does
1)Type numbers, which are given as code, into Sheet1.B2
2)Create a new file named [what is written in A1]&"_"&01, lets say "FPST_01"
3)Copy from workbook "FPST" Sheet2.AW1:BA2680. to "FPST_01" Sheet1.A1:E2680 .
4)While pasting these copied data, if B2 of first sheet equals to 1, macro should paste data to A1:E2680, BUT, if B2 equals to 2 then it should paste to F1:J2680 if B2 equals to 3 then macro should paste data to K1:O2680.
Is there anyone who has an idea about these 4 questions above?