create sheet for each row (date)

avishain

Board Regular
Joined
Dec 14, 2010
Messages
75
hello there,

im using excel 2007.

got a workbook which contains 1 worksheet called "month".

column "k" consist of dates of the current month in this format:

01.03
02.03
03.03
04.03
the format is (dd.mm) cause i dont live in the U.S
and so on till the end of the month.

i want that for each date excel will add a new worksheet and the name of the worksheet will be the date. (for instance "04.03")

in addition, in the same worksheet called "month" i got a table from A1:H180 which constist a vlookup formula .

i want that this table will be copied to all new worksheets and the refference of the vlookup will change of course depent on the worksheet's name.

for instance,for sheet called "01.03" the vlookup in cell H2 will be:

VLOOKUP(H2,'[xxx.xlsx]01.03'!$B:$B,1,0)

for sheet called "07.03" the vlookup in cell H2 will be:

VLOOKUP(H2,'[xxx.xlsx]07.03'!$B:$B,1,0)

thank you :)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi there

I'm afaraid my abilites are such that I can take you so far with this.

If you select the cells you want to make new sheets from and then run the following code it will create the sheets and place the table on them,
I'm afraid I would have to manually insert the formulas from there, BTW I dont think you can reference H2 in H2

Code:
Sub NewDays()
Dim ThisWS As Variant
    For Each cell In Selection
        ThisWS = cell.Value
        Worksheets.Add after:=Worksheets(Worksheets.Count)
        Worksheets("Month").Range("A1:H180").Copy Range("A1")
        ActiveSheet.Name = ThisWS
       
    Next cell
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,881
Messages
6,122,074
Members
449,064
Latest member
MattDRT

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