helpneeded2
Board Regular
- Joined
- Jun 25, 2021
- Messages
- 110
- Office Version
- 365
- Platform
- Windows
I am not very experienced with VBA, and I am trying to use code from another sheet I made in which it was coping only the data that is visible on the sheet.
On the new sheet I am creating, the sheet may have up to 25000 rows of data, across 69 columns. There will be no blanks rows of data in between the rows of data. The raw data pasted in will vary between 1000 rows to 25000 rows.
When I try to run the above formula I get an error message:
The source sheet has the following filter which I thought might somehow be related to the problem, however to test it out, I copied and pasted the data shown there as values, and still got the same error.
When I click on "debug", it highlights the fourth line of code: Range("A4").Resize(endOfRows, 69).Select . This code works fine on my other sheet, so I just can't figure out why it is not working on this sheet?
Excel Formula:
Sub rangeSelection()
Dim endOfRows As Long
endOfRows = Range("A25003").Value
Range("A4").Resize(endOfRows, 69).Select
Selection.Copy
End Sub
On the new sheet I am creating, the sheet may have up to 25000 rows of data, across 69 columns. There will be no blanks rows of data in between the rows of data. The raw data pasted in will vary between 1000 rows to 25000 rows.
When I try to run the above formula I get an error message:
Excel Formula:
Run-time error '1004':
Application-defined or object-defined error
The source sheet has the following filter which I thought might somehow be related to the problem, however to test it out, I copied and pasted the data shown there as values, and still got the same error.
Excel Formula:
=FILTER(INDEX(table_rawData,SEQUENCE(ROWS(table_rawData)),XMATCH(A1:BQ1,table_rawData[#Headers])),(table_rawData[BR]="Yes")+((table_rawData[PatronRiskLevel]="POI")*(table_rawData[BR]="No")))
When I click on "debug", it highlights the fourth line of code: Range("A4").Resize(endOfRows, 69).Select . This code works fine on my other sheet, so I just can't figure out why it is not working on this sheet?