Hi
Please can some assist me. Desparate in need of help.
I have attached the spreadsheet.
User key in the number of hours on shift in cell J46.
And
I want spreadsheet to be generated for that many hours.
http://i47.tinypic.com/rjqnpc.jpg
http://i47.tinypic.com/rjqnpc.jpg
example if cell J46 has 10 then i want row 5 to 14 to be generated.
If cell J46 has value 4 the i want row 5 to 9 to be generated.
Please could some assist me i have give this project in by 9am tomorrow.
Appricate anyone help.
Hi,
Your request isn't clear. What do you mean by?I want spreadsheet to be generated for that many hours.
e.g. what are you expecting to happen and where?
Rgds
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
But what do you mean by 'generated'. Do you mean they don't exist before and you want the macro to add new rows or what? All the existing rows have formulae in them so what is there to 'generate'?
Rgds
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
Hi,
Add the following macro and attach it to a button.
RegardsCode:Sub ClearData() Dim iRows As Integer iRows = Range("J46") If iRows > 15 Then iRows = 15 Sheet1.Range("B6:Z20").ClearContents Range("B5:Z5").Copy Range("B5:B" & iRows + 4).PasteSpecial (xlPasteFormulas) End Sub
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks