Linked Questions
10 questions linked to/from Excel VBA - exit for loop
0 votes
2 answers
8k views
Excel: how to paste to first blank cell?
I'm trying to paste info to the first blank cell in colum A of a sheet? How can I do this? This is what I have done but it paste the info 1000 times. What do I need to change? Thanks in advance. ...
1 vote
2 answers
4k views
For Each Loop, need to skip
I'm having an issue where I get stuck in an infinite loop (infinite through the end of the range, that is) with my For Each Next loop. I know that I can't loop backwards, and of course can't have a ...
1 vote
1 answer
2k views
Excel find rows with #na [duplicate]
I'm trying to find a way to find rows with #na so that I can copy the row and past it in another tab so that the error can be analysed. So far I have the following, but I have some problems Dim ...
0 votes
0 answers
4k views
Newton-Raphson in Excel VBA
I want to make Newton-Raphson iteration but stuck on how to incorporate changing Y into the function of interest. For the values of Tpr and Ppr varibles in my code, I expect to have value of Z approx ...
1 vote
3 answers
1k views
For each cell in range if cell is negative then change color
I'm pretty knew to VBA and I'm trying to check if in the specific range of column M if there's a negative number and if it is to change the font to red. This is only working for the first number in my ...
0 votes
1 answer
180 views
Exit for loop to prevent overwrite
I used Exit For as suggested in Excel VBA - exit for loop to fix the overwrite. I am getting Next without For error on Next j line, which is the second line to the end. For i = 2 To lastrow For ...
0 votes
1 answer
131 views
Add user entry if not a duplicate
The goal of this code is to accept a user input number (New_Project_Number) then read down a list (column A3 to last row of the column) compare the numbers and check for duplicates. Then paste the ...
0 votes
1 answer
133 views
Search and open a Word file by name from the cell
I have code that searches for and opens a Word file with the same name that value from the cell ("B9"): Sub find() Dim f As String, folder As String, file_name As String Set wordapp = ...
0 votes
0 answers
110 views
Breaking the For loop
How do I exit the For ITERATION in loop if the condition is met and then go to the next one. The sheet has several thousand lines and such a break in the loop would speed up the code. This is not exit ...
0 votes
0 answers
67 views
End for loop when condition is met
Given the code below. I'm trying to end the for loop as soon as the condition that the value TOTALE ORE has been found. I'm having a hard time figuring this out. Any help is much appreciated. For Each ...