Home > Software engineering >  Use Excel macro recording, how to read a column the last line of the data
Use Excel macro recording, how to read a column the last line of the data

Time:11-16

Often use Excel at ordinary times, often in the first column input zero to the value of x (x for the first column of the last line B valid data on several), using record macro how to read the B column the last line of the data, so make A list of add x form automatically closed,

CodePudding user response:

Usedrange. Rows. The count, this is the last line
Usedrange. Columns. The count, this is the last column

CodePudding user response:

Range (" B1048576 "). The End (xlUp). The Value

CodePudding user response:

This is last line read automatically effective effective line number

CodePudding user response:

refer to the second floor JamesBondeee response:
Range (" B1048576 "). The End (xlUp). The Value

This is last line read automatically effective effective line number

CodePudding user response:

reference 1/X - I - n reply:
usedrange. Rows. The count, this is the last line
Usedrange. Columns. The count, this is the last column

Excuse me, does this string of characters to add?

CodePudding user response:

You try, this is the last line of the column B data,

CodePudding user response:

Cells (rows. The count, "b"). The end (xlup)

CodePudding user response:

A maximum line number Column: c=Range (" IV1 "). The End (xlToLeft). The Column
A line biggest column number: R=Range (" a1048576 "). The End (xlUp). Row
Cells (C, R). The value
  •  Tags:  
  • VBA
  • Related