I am new to macros and need help finishing it.
I have a spreadsheet with numbers in column A, the numbers range from 1-40 and go in order least to greatest. Typically have about 10 numbers in column A.
I need a macro to have a popup and ask for a number input, then to take that number and find the next largest number that exists in column A. then to run another macro “Insert_divison”
Example: User inputs “3” I need it to look for 4 then 5 then 6… until it finds a match.
Currently my macro only is looking for one number past the input. (user input 3, if 4 does not exist the marco will error out)
myvalue = InputBox("Insert Division Number")
Dim findrow As Long, findrow2 As Long
findrow = Range("A:A").Find(myvalue + 1, Range("A1")).Row
Range("A" & findrow - 1).Select
ActiveCell.Offset(1).Value = myvalue