Close Window
Free Ebook
Get Your Free Excel
Top 15 Excel Tutorials from
Instant Access!

How To Do A Macro For Payment Voucher, Cash Book, And Bank Checks/cheques?

How to do a macro for Payment Voucher, Cash Book, and Bank Checks/Cheques?

I shall be much obliged if you guys could kindly help me using VBA codes or Macro to run the following.

1. I have worksheet named Payment Voucher in Book1.
1.1 Date in Cell G1
1.2 Name in Cell B4
1.3 Invoice amount in Cell B7
1.4 Amount in Number [1,450,000.38] in Cell F7

2. I hope that you guys could help me to do the following:-

2.1 When I key DATE in Cell G1 at Payment Voucher, DATE automatically appear in the following 2 worksheets.
2.1A) Cell A2 of worksheet Cash Book (Book2)
2.1B) Cell G1 of worksheet Bank Check (Book3)

2.2 When I key NAME in Cell B4 at Payment Voucher, NAME automatically appear in the following 2 worksheets.
2.2A) Cell C2 of worksheet Cash Book (Book2)
2.2B) Cell B4 of worksheet Bank Check (Book3)

2.3 When I key AMOUNT in Cell F7 at Payment Voucher, NUMBER automatically appear in the following 2 worksheets.
2.3.A) Cell E2 of worksheet Cash Book (Book2)
2.3.B) Cell F6 of worksheet Bank Check (Book3)
2.3.C) Cell B6 of worksheet Bank Check, Number in TEXT must appear like this: One Million Four Hundred Fifty Thousand And Cents Thirty Eight Only

Any suggestion and advice is highly welcomed and appreciated.

Thousand thanks in advance.


Free Excel Courses

Similar Excel Tutorials

How to calculate the payment amount for a loan or similar financial instrument that has a series of constant paymen ...

VBA comparison operators are used to compare values in VBA and Macros for Excel. List of VBA Comparison Operators C ...

The Future Value function (FV) in Excel will return the future value of an investment based on a particular intere ...

How to calculate the number of periods required for an investment in order to get the desired return.  The number o ...

Helpful Excel Macros

- Convert a numeric dollar amount into its text equivalent. This UDF (user defined function) for Excel will change or tra

- This free Excel macro applies the Short Date number format to a selection of cells in Excel. This number format display

- This macro allows you to have your worksheets named by whatever is in a particular cell within a worksheet. This means

- This macro will automatically close the workbook in which it is located after that workbook has been opened for a certai

- This is a macro which will delete blank rows in excel. This version will delete an entire row if there is a blank cell

Similar Topics

A previous poster explained what I also need; there were no responses,
so I thought I would try again.

Does anyone know of an Excel template--or a small stand-alone
program--that will calculate the interest/principal breakdown when
payments are varied in amount and frequency? Free or low-cost, please.
I need one that will work on my Mac/Office 2004. I will need to print
out periodic reports.

Here is the way the previous poster described it:
"Excel template: Loan Amortization for random/irregular payments,
figures days
between payment dates.
I have a loan with a variable beginning balance and irregular payments
annual large payment. (based on collections)
Would like to enter payment and date.
then Excel would figure days since last payment, interest amount,
amount, Ending Principal balance.
And total interest paid, total pricipal paid
If I change the starting principal, excel would recalculate all

Thanks very much.

Hello, please help me out with this one.

So I am at work workin on this report and I need a function that will make Excel automatically insert the today's date in a cell (let's say D90) when I fill the content of another cell (for example C90) and the that will be inserted will never change. I tried to use the =TODAY( ) function but it keeps updating the date in the cell to the current date if i reopen the worksheet 2 days later. I need the cell to keep in the cell the date of the day when I filled in the content of cell C90 and do not updated it every time i open the document to the actual date.. Thanks in advance!!

Hi was wondering if anyone can help.

I am trying to reference a cell on another worksheet, the cell is formatted to be a date. when i put in the following formula =Sheet2!A1 and i don't input a date into A1 on sheet 2 the cell containing the formula shows the date 00/01/1900, is there any way of stopping this showing, ideally the cell would be blank until I inputted a date into A1 on sheet 2

Any help would be very much appreciated

I am trying to automatically capture and record the date of a cell's last change in value (date stamp). I have an item price list and if a particular cell gets updated I want to automatically record the date of change of that cell. I realize that after I change cell A1 I could tab to cell B1 and enter Ctrl+; but if I have a hundred new prices to enter I don't want to do that (plus me or the data entry person might forget).

For instance,

1 $32.17 8/17/08
2 $43.20 9/12/09

If I go in and update cell A1 to $33.98 today I would like cell B1 to read 2/16/10. But I don't want cell B2 to change.


I have a couple of worksheets that have goal seek already performed on 20 target cells (for each worksheet). I did this manually, without a macro (since I'm absolutely horrible at all of this).

Now from what I can tell, I need a code to add to the worksheet module in order to make sure that the goal seek updates itself whenever I change a value in the formula of the target cell.

what IS that code?! I can't understand the codes some people have put up, so I have no idea what to do.

Target Cell: M21:M42
Changing Cells: N21: N42

I am trying to copy balances from one worksheet to another over a total of 12
worsheets ..... this is for petty cash monthly sheets and I need a running
total over the 12 sheets.

At present I have to do this manually .... is there a formula that I can use
that will automatically carry the balances over

Thanks for your help

Hi all.

I have set up a workbook that is sent out to lots of different users. They each keep and use their own copy.

I have set it up so that everything looks OK and is visible on MY screen, but I'm conscious that some users may have different screen sizes, different toolbars set up, and so on, which might make some parts not immediately visible to them.

I have set up an auto-execute macro which automatically sets the zoom factor to best fit, for several of the worksheets, and this works fine.
Here's the code that does it.

 ActiveWindow.Zoom = True

By repeating this code for each worksheet, I can make each one be zoomed just right.

However, the file contains 8 sheets that are all identically laid out, except the number of rows is different.
What I want to do is go to the worksheet that has the largest number of rows (it's always the same worksheet, so I know which one it is), set the zoom factor for THAT worksheet (which I can do, and it always has the same number of rows), and then take THAT zoom factor, whatever it is - and it will vary depending on the user - and apply that to the other worksheets that have a similar layout.

I could just go through each worksheet and zoom it automatically, but that would mean that some of the sheets looked very large, others very small, and I'd like them to have a consistent appearance.
I could also specify a range on each worksheet that was similar to the appropriate range on the longest worksheet, and zoom that automatically, but that's not ideal either, because some of the row heights vary from sheet to sheet, and again I'll end up with different font sizes.

Anyone know how to do this ?

Can anyone help me with creating a macro that will save the worksheet as a pdf in a specific folder with the value of a cell and the date. This is what I have so far.

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Range("H10").Value & Format(Date, "mmdd")

This saves it as the correct cell value + the date, but it saves it to my documents. I need it to save to a shared folder on a network drive.

Any help would be greatly appreciated.

Hi can someone help please?

I have two worksheets and wish to copy rows from worksheet 1 to worksheet 2 if a condition is met in one of the cells within that row.

Hope that makes sense.


I have never really used VBA and so am completely stuck at this problem. I need to create a macro which auto-populates a master worksheet from the individual user sheets in a shared workbook.

Sheet 1 is the master sheet "Team Stats". There will be an undetermined number of individual worksheets to accomodate new staff.

Each worksheet will be identical, using columns A-I with row 1 having the headings:

Date, Name, Reference, Value, Price, Age, Purchased?, Destination, Add. Products (the last 3 columns will have a drop-down list which will be used to enter data into the cell).

There will be a varying number of rows in each of the individual sheets.

If possible I would like the macro to run every time data is entered into one of the individual worksheets. If this is not then it would be fien to update every time the workbook is opened.

If anyone can help it would really cut down the time I spend collating these stats every day!

I was wondering if anyone could help me out please?!?!

I need to have a cell on Sheet2 display the TEXT from a cell on Sheet1, is his possible??


Sheet1, Cell A1 contains a clients name and I would like to have Sheet2, Sheet3, Sheet4 etc... Display that clients name in a cell of my choosing (could be a different cell on each Sheet) automatically after entering it once on Sheet1, cell A1.

I thought this was possible but I can't seem to figure it out. I haven't done any real Excel work in quite a long time but I thought I had done this before a long time ago!! Any help would be GREATLY appreciated!! Thanks in advance...

P.S. If I use autosum to do this it just displays the number 0, obviously, since it is trying to add numbers...

I uploaded a copy of the spreadsheet, What I would like to happen is have the text from Sheet1,D4 automatically be placed in Sheet2,A1 and Sheet3, B2. Hope this helps


Newbie here and I don't know where to start... I'm trying to set up a macro to when data is pasted to a TEMPLATE worksheet tab it will automatically copy and paste data to another sheet based on the month value.
For example:
If data contains 06/01/2011 in cell A1, then data needs to be pasted to "Jun" worksheet within the same workbook.

Can someone assist or can give some direction? Thank you

Also, I cannot move the Pivot Table from the new Worksheet it is created in, to my existing Worksheet.

I am running Excel 2011 for Mac.

I have a Worksheet with a small amount of data, and when I click the Pivot Table button it automatically creates the Pivot Table in a new Worksheet. The Pivot Table data is fine, but I want it to display alongside the source data.
I've tried using the Move Pivot Table option and choosing to Create Pivot Table in Existing Worksheet and choosing a source cell alongside my current data, but nothing appears. Also, I checked in Edit menu and found that the Pivot Table appears to have not even been created/moved because there is no option to undo it.

Appreciate any help, let me know if you have any further questions.


We have a workbook that does not allow us to use the Move or Copy command. When we right click on the worksheet and select Move or Copy, we are able to check the box to make a copy, but when we click OK nothing happens.

We have checked to make sure that the workbook and worksheet:
1. Are not protected
2. That there are no hidden worksheets
3. That there are not worksheets that exist with the same name
4. That not all the worksheets are selected

There are only two worksheets in this workbook.

Any ideas of why we are unable to make a copy of this worksheet within the same workbook or to another workbook?

I'm going over a worksheet (prepared by someone else) where I can't see the text that has been typed in the worksheet within the cells. I can see it in the editing bar, but not in the actual cell. It doesn't appear to have anything to do with the color of the text... suggestions?

Entering time values in custom format [h]:mm:ss
Cells accept hours over 23,
Adding cells in column returns correct total time.
Have not found a way to multiply these cells by a $ hourly rate.
So use HOUR(cell ref) and MINUTE(cell ref) to capture values in referenced
cell - then use these values to calculate total payment for $rate per hour.
However, the HOUR(cell ref) formula returns the hours in excess of 24 when
the cell contains an hour value in excess of 23 (ie 27 hours returns 3).


I am brand new to Mr. Excel and would love some advice.

I searched the boards pretty extensively but could not find what I am looking for...I apologize if this is a duplicate.

I am using Excel 2007

How do you automatically add rows and update values for cells to a linked worksheet in which rows have been added? For example: Sheet 1, columns A & B are linked to Sheet 2, columns A & B. Sheet 2 has values in A1:A5 & B1:B5 and Sheet 1, since it is linked, has the same info. I want to add a row in between 3 & 4 on Sheet 2 and want Sheet 1 to automatically add the same row and update the value of the cell in column A & B.

Any help is greatly appreciated!


I have a textbox in my userform where anything typed in the box is entered into cell A2 in my worksheet. However, multiple lines of text are not properly displayed in my worksheet. I have enabled MultiLine and EnterKeyBehaviour in the properties window of the textbox so I can type multiple lines in my textbox. The problem is that when I press the button to enter the text from my txtbox to cell A2, the cell doesn't actually display the text in separate lines. It just places a square symbol in the place that enter should have been pressed and the text should have been split into separate lines.

How can I get the separate lines of text in my textbox to be properly displayed in a cell? Thanks for your help in advance..

From limited experience I know that excel calculates dates via serial numbers.

I have formulas to add a number of days to a cell containing an entered date and display the resulting new date (ie. 03/01/2011 (c34)+11 = 03/12/2011)

I am seeking to leave resulting formula cell blank until a date is entered in the input cell. Currently when the input cell is empty the formula cell obviously displays 1/11/1900 using the above example.

What conditional format would achieve leaving the formula cell blank until date data in entered into the source cell?

Hopefully a simpler question for your experience level than mine.

I have an image or picture within a worksheet.

I want to be able to reference it from a cell so that depending on a
validation list a different picture is shown.

Is this possible in Microsoft Exec 2000

I have workbook in which I want to save a specific worksheet to a new file with only the values saved - all data in this worksheet are references to cells on another worksheet, which is using VLOOKUP to pull data from a database.

Found the following code and it gets me close, but it copies the cell references, not the values. It also allows me to specify the file name from a cell reference.

I want the new workbook file to simply be saved, not opened, and a message box to display stating where the file was saved (will always be in the same location on the LAN).

What modifications do I make to this to get this to work per above requirements?

Sub CopyMe()
Dim SaveMeAs As String
SaveMeAs = Sheets("Sheet1").Range("B2").Text
ActiveWorkbook.SaveAs Filename:="C:\My Documents\" & SaveMeAs
End Sub

Hi All,

I am trying to make excel automatically add a leading zero to values which are 5 digits long;

i.e. number input is 15185, then excel automatically changes it to 015185.

If I put a Customer Number Format of 0##### it works, however, a user could put any length of number into these cells, and if the number is less than 5 digits I don't want a leading zero.

Is there any way of writing a small macro to sort this out.

The numbers would be input into range B16:223.

Many thanks,


Since there isn't a ISDATE function in excel.

The following can be used to simulate the same, and avoid having to achieve the same with VBA's IsDate function:

1- Format the column (ex A) as text

2- Formula to check for valid dates:

I'm sure this has been addressed before, and I'm sure one of you 50lb heads has the answer I'm looking for. I want to generate a bank of 200-300 questions in excel and be able to make a test of 50 questions that will be different every time. I want to be able to do this with multiple choice questions as well as just plain essay questions. Can I have some instruction or examples? Thanks guys!

Related pages

vba option button selectedextract outlook calendar to excelinsert copied cellshow to insert brackets in excelhard return in excelcannot empty the clipboard excel 2007spie chartexcel weighted averagesexcel formula exclude weekendsformula to convert kilograms to poundsuse sheet name in formula excelexcel scatter plot different colors3d excel graphpto spreadsheethow to delete duplicate records in excel 2007delete activexphic tableexcel sort buttonassign a macro to a button in excel 2010excel vba upperexcel macro replacectrl shift excelvba sapconcat two cells in excelcrc 16 calculatorunhide sheetsmaster sheet excelautofit in excel vbahow to figure out accumulated depreciationfortnightly income tax calculatorhow to convert digits into words in excel 2007how to calculate annual leave entitlementexcel macro option buttonspell checker in excelexcel hex to decimalloop function in excelcolor index excelsplit row excelmargin formula in excelhide formulassurface chart in excelformula for calculating attrition ratebulleted list in excelsquared symbolformula to remove duplicates in excelwhat is xlsbcreate addition and subtraction worksheetsdatediff excel 2010inverse colourvba compare datesvba replace wildcardsubtract sum in excelexcel vba file pathlotto numbers predictionsexcel runtimefilter blank cells in excelexcel getdateconnector in flowchartvlookup in numberssimple interest formula exceladvanced filter excel 2010subtraction on excelsumif multiple columnsbreak vba passwordvba concatenationvba variable in rangeradar chart excelslope function in excelprint command in vbaexcel macro copy paste8.00 am cst to istfile extension xlsmsort dates in pivot tablewhat is the default column width in excelhow to separate last name in excelmt4 dde excel