WPS table How to batch production of pay bar

Source: Internet
Author: User

method of batch production of payroll in WPS form

Of course, first of all, there must be a salary sheet for all employees:

Want to see what the finished pay bar looks like? Let's look at the print preview:

The salary scale is very simple, it is a common form. Payroll worksheets are also simple, because all cells are in the same formula.

The payroll is SHEET1, in order to print conveniently, we make the payroll in the Sheet2. So, look at sheet2!. What does the formula of A1 look like:

=if (MOD (ROW (), 3) =1,sheet1! A$1,if (MOD (ROW (), 3) =2,offset (sheet1! A$1,int (ROW ()/3) +1,0), "")

Oh, yes, it's a bit long, so you might as well break it down:

=if (

MOD (ROW (), 3) = 1,

sheet1! A$1,

IF (

MOD (ROW (), 3) = 2,

OFFSET (sheet1! A$1,int (ROW ()/3) +1,0),

""

)

)

01 lines, the 1th if statement, the conditions in 02 lines;

02 lines to determine if the current row is the line where the payroll header should be, that is, 1th, 4, 7, 10 ... Line

03 rows, the value is sheet1! when the 02-line condition is true A$1, that is, the head of the table;

04 lines, when the 02 line condition is False, enter the second if statement

05 lines to determine if the current row is the line where the payroll value should be, that is, 2nd, 5, 8, 11 ... Line

06 lines, based on the 1th row of the Sheet1 offset to refer to the payroll data;

07 lines, that is not the header is not a number, that is for the interval of the empty line!

This formula uses mod two times (Row (), 3), and int (row ()/3) at a time. So what's the relationship between the current line number and 3? Notice that each wage bar is made up of a row of headers, a row of data, a line of blanks, just 3 rows. If you think 1 lines of blank printing is not convenient to cut, want to leave 2 lines of blank, the three Formula 3 should be changed to 4.

Now is the time to adjust the format. First we don't want to have a table line on a blank line, as a result, you can't print a network line when printing, but we want the payroll header and the data to be separated by lines, so we need to add a table line to the two lines of data--of course, you can fill out the entire worksheet and then set up a payroll bar, just so much trouble-- So we use the conditional formatting feature.

Or select A1, open the Conditional Formatting dialog box, select a formula: =mod (ROW (), 3) <>0; then set the format to a four-week border, OK.

Now to populate the entire worksheet.

Select A1 to the right and drag the fill handle to the bottom-like "+" number until all the payroll items (this row is the header) are filled out.

At this point, all the header items in line 1th are selected. Now it's time to drag the fill handle down until everyone has a pay bar. This can be calculated according to the number of people in the payroll, where the number of rows filled is 3 times times the number of people (remember the 3 mentioned above? If you change to 4, that's 4 times times).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.