hàm offset, type trong excel

  • Thread starter caycachuathanky
  • Ngày gửi
Khóa học Quản trị dòng tiền
H

Hoangvn79

Cao cấp
26/6/06
629
0
0
HN
Để tìm hiểu các hàm trên bạn có thể vào Excel. Bấm F1 và đánh hàm cần tìm là biết...
Hàm type trả về kiểu của giá trị.
Công thức: TYPE(value)
If value is--------------------------- TYPE returns
Number------------------------------------ 1
Text------------------------------------ -- 2
Logical value-------------------------------4
Error value---------------------------------16
Array-------------------------------------- 64

VD: TYPE("Smith") trả về giá trị 2
 
Sửa lần cuối:
QDuc

QDuc

Cao cấp
3/6/06
254
18
18
Biển khơi
Xem tiếp trong các VDụ sau, sẽ dễ hơn với bạn chăng:

http://webketoan.vn/forum/showthread.php?t=26129&highlight=type

OFFSET
Show All
Hide All
Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and the number of columns to be returned.

Syntax

OFFSET(reference,rows,cols,height,width)

Reference is the reference from which you want to base the offset. Reference must refer to a cell or range of adjacent cells; otherwise, OFFSET returns the [HASHTAG]#VALUE[/HASHTAG]! error value.

Rows is the number of rows, up or down, that you want the upper-left cell to refer to. Using 5 as the rows argument specifies that the upper-left cell in the reference is five rows below reference. Rows can be positive (which means below the starting reference) or negative (which means above the starting reference).

Cols is the number of columns, to the left or right, that you want the upper-left cell of the result to refer to. Using 5 as the cols argument specifies that the upper-left cell in the reference is five columns to the right of reference. Cols can be positive (which means to the right of the starting reference) or negative (which means to the left of the starting reference).

Height is the height, in number of rows, that you want the returned reference to be. Height must be a positive number.

Width is the width, in number of columns, that you want the returned reference to be. Width must be a positive number.

Remarks

If rows and cols offset reference over the edge of the worksheet, OFFSET returns the [HASHTAG]#REF[/HASHTAG]! error value.

If height or width is omitted, it is assumed to be the same height or width as reference.

OFFSET doesn't actually move any cells or change the selection; it just returns a reference. OFFSET can be used with any function expecting a reference argument. For example, the formula SUM(OFFSET(C2,1,2,3,1)) calculates the total value of a 3-row by 1-column range that is 1 row below and 2 columns to the right of cell C2.

Example

The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

Create a blank workbook or worksheet.
Select the example in the Help topic.
Note Do not select the row or column headers.



Selecting an example from Help

Press CTRL+C.
In the worksheet, select cell A1, and press CTRL+V.
To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.

1
2
3
4
A B
Formula Description (Result)
=OFFSET(C3,2,3,1,1) Displays the value in cell F5 (0)
=SUM(OFFSET(C3:E5,-1,0,3,3)) Sums the range C2:E4 (0)
=OFFSET(C3:E5,0,-3,3,3) Returns an error, because the reference is not on the worksheet ([HASHTAG]#REF[/HASHTAG]!)


Còn đây là những công thức khó hiểu trong hàm mảng:
{=OFFSET(INDIRECT({"'Sh1'!G8:G18"}),0,0,1)} => G8
{=OFFSET(INDIRECT({"'Sh1'!G8:G18"}),1,0,1)} => G9
{=OFFSET(INDIRECT({"'Sh1'!G8:G18"}),10,0,1)} => G18
:mrstraetz Ễcl!
 
Sửa lần cuối:
HongViet

HongViet

Cao cấp
10/11/05
286
10
18
Đà nẵng
Bổ sung thêm 1 số ví dụ, về Offset()

Dynamic Named Ranges Examples

For ALL examples you need to:

Fill Column A with a mix of text and numeric entries.
Go to: Insert>Name>Define and in the Names in workbook box type any one word name (I will use MyRange) the only part that will change is the formula we place in the Refers to box.
1:Expand Down as Many Rows as There are Numeric Entries.
In the Refers to box type: =OFFSET($A$1,0,0,COUNT($A:$A),1)
2:Expand Down as Many Rows as There are Numeric and Text Entries.
In the Refers to box type: =OFFSET($A$1,0,0,COUNTA($A:$A),1)
3:Expand Down to The Last Numeric Entry
In the Refers to box type: =OFFSET($A$1,0,0,MATCH(1E+306,$A:$A,1),1)
If you expect a number larger than 1E+306 (a one with 306 zeros) then change this to a larger number.
4:Expand Down to The Last Text Entry
In the Refers to box type: =OFFSET($A$1,0,0,MATCH("*",$A:$A,-1),1)
5:Expand Down Based on Another Cell Value
Put the number 10 in cell B1 first then:
In the Refers to box type: =OFFSET($A$1,0,0,$B$1,1)
Now change the number in cell B1 and the range will change accordingly.
6:Expand Down One Row Each Month
In the Refers to box type: =OFFSET($A$1,0,0,MONTH(TODAY()),1)
7:Expand Down One Row Each Week
In the Refers to box type: =OFFSET($A$1,0,0,WEEKNUM(TODAY()),1)
Requires the "Analysis Toolpak" to be installed. Tools>Add-ins-Analysis Toolpak
 
V

Van Trang

Guest
Tôi có 01 sheet01 dung để nhập liệu các chứng từ phát sinh trong đó có cột định khoản các nghiệp vụ như vây tại đây các tài khoản kế toán đang nằm rải rác ở các dòng.
Vấn đề ở đây tôi muốn lấy dữ liệu các dòng có chứa một tài khoản nào đó sang sheet02 để tạo sổ cái cho TK đó thì dữ liệu bị nằm rải rác không liên tục từ trên xuống.
Nhờ các bạn có thể giúp tôi, chỉ dùng hàm để lấy các dòng dữ liệu theo mong muốn của các TK nhưng được liên tục từ trên xuống. Cảm ơn các bạn.
 
K

Khong can biet

Guest
27/8/08
2
0
1
42
Hung Yen
Tôi đang làm kế toán hàng tồn kho, chứng từ phát sinh hàng ngày và tôi vào chung trong một sheet từng ngày khác nhau, trong những ngày đó có nhiều mã hàng và mặt hàng giống nhau. Vậy làm theo công thức nào để tôi tổng hợp được các mã hàng đó của những ngày tháng khác nhau vào làm một.
Nhờ các bác có thể chỉ giúp tôi.
Cảm ơn các bác.
 
V

volga

Guest
7/2/09
33
0
0
40
Vỉnh Long
Tôi đang làm kế toán hàng tồn kho, chứng từ phát sinh hàng ngày và tôi vào chung trong một sheet từng ngày khác nhau, trong những ngày đó có nhiều mã hàng và mặt hàng giống nhau. Vậy làm theo công thức nào để tôi tổng hợp được các mã hàng đó của những ngày tháng khác nhau vào làm một.
Nhờ các bác có thể chỉ giúp tôi.
Cảm ơn các bác.

Anh nên tìm hiểu chức năng Advanfiler đi .Lọc ra một danh sách duy nhất cho anh ngay .
Nếu dùng công thức thì củng ok .Anh qua giaiphapexcel mà tham khảo nhe !
Thân
 
L

laptopvt

Guest
27/6/09
6
0
0
38
vung tau
Anh nên tìm hiểu chức năng Advanfiler đi .Lọc ra một danh sách duy nhất cho anh ngay .
Nếu dùng công thức thì củng ok .Anh qua giaiphapexcel mà tham khảo nhe !
Thân
 
L

laptopvt

Guest
27/6/09
6
0
0
38
vung tau

Nguyên văn bởi Khong can biet
Tôi đang làm kế toán hàng tồn kho, chứng từ phát sinh hàng ngày và tôi vào chung trong một sheet từng ngày khác nhau, trong những ngày đó có nhiều mã hàng và mặt hàng giống nhau. Vậy làm theo công thức nào để tôi tổng hợp được các mã hàng đó của những ngày tháng khác nhau vào làm một.
Nhờ các bác có thể chỉ giúp tôi.
Cảm ơn các bác.
Bạn nên tìm hiểu chức năng Pivot table trong excel.
 

Xem nhiều

Webketoan Zalo OA