ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using Absoloute Cells And Hiding Data (https://www.excelbanter.com/excel-discussion-misc-queries/85277-using-absoloute-cells-hiding-data.html)

xyster

Using Absoloute Cells And Hiding Data
 

Hello all, i am new here.

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


I need a spreadsheet that can be used to enter the hours worked by
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 the
formulas to stick sucesfully.

However i require aq macro to copy the Week ending, Hours worked, gross
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 i
have also been able to do aswell.. but i am keeping everything i set
out to create here so you understand what i have done so far - My code
is messy for this though i was using the basic macro creator at fist
then tried editing the macro manually). that have just been created and
then hide the previoes weeks information in the columns to the left.

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

Where i am stuck is this task is only performed once, i tried using
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 the
time period each time.

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

Attached is the excel document and the macro (hopefully its still in
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 |
+-------------------------------------------------------------------+

--
xyster
------------------------------------------------------------------------
xyster's Profile: http://www.excelforum.com/member.php...o&userid=33854
View this thread: http://www.excelforum.com/showthread...hreadid=536302



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

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