Using Absoloute Cells And Hiding Data

X

xyster

Hello all, i am new here.

i have an excel problem i have been workin on now for a few days wit
no sucess.


I need a spreadsheet that can be used to enter the hours worked b
staff each week and then calculate their Gross pay, Tax and Net Pay
This i have managed to achieve and used absoloute cells and gotten th
formulas to stick sucesfully.

However i require aq macro to copy the Week ending, Hours worked, gros
pay, tax and net pay columns to the first empty cell in row 1,

clear the entries in the week ending and hours worked columns (this
have also been able to do aswell.. but i am keeping everything i se
out to create here so you understand what i have done so far - My cod
is messy for this though i was using the basic macro creator at fis
then tried editing the macro manually). that have just been created an
then hide the previoes weeks information in the columns to the left.

The macro i created succesfully copies the previos 5 colums (wee
ending to net pay) and duplicates them in 5 coloumns that follow, i
also hides those 5 columns.

Where i am stuck is this task is only performed once, i tried usin
Absoloute Cells to achieve my goal but failed dismally it seems. Also
I have no idea how to work out how to get it to add 1 week on to th
time period each time.

That is my ultimate goal, but until then i only require it to jus
ignore the information about the previos week and let it get cleared a
its not overly important.

Attached is the excel document and the macro (hopefully its still i
there.. lol).

It's under the 'Pay Details' Tab Which i am refering to.


Code
-------------------
Sub mcrHideMake()
'
' mcrHideMake Macro
' Hide Old Info
'
' Keyboard Shortcut: Ctrl+m
'
Range("$D$1:$H$5").Select
Selection.Copy
Selection.EntireColumn.Hidden = True
Range("$I$1").Select
ActiveSheet.Paste
Range("$I$2:$M$5").Select
Application.CutCopyMode = False
Range("$I$2:$I$5").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("$J$2:$J$5").Select
Application.CutCopyMode = False
Selection.ClearContents

End Sub


-------------------


Incase the macro doesnt copy thats wat i have..

Thanks in Advance :

+-------------------------------------------------------------------
|Filename: Art Australia + Macro.zip
|Download: http://www.excelforum.com/attachment.php?postid=4698
+-------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top