Access to a cell
Would someone PLEASE be able to help me with this!!!!
I am trying to go through a spreadsheet and delete some unwanted data. I have created some if statements in order to determine which data should be deleted etc, however i want to dynamically change the rows that i test.
I have created a variable called starta and use this to store the row that i want to start my loop on. the problem i have is using this variable as part of a select statement.
starta = InputBox("please enter the starting row")
the select statement i have is:
atest = Range("A"&starta&":A"&starta).Value
if, for arguments sake, starta = 23, then i want atest to be like this:
atest = Range("A23:A23").Value
which would mean that atest holds the value of the cell A23
but when I try this line (the one in red) I keep getting an error.
Could someone please offer some assistance.
|