I have a column of numbers and want to go through each cell to check if the number is positive, or negative. After determining if a number is positive, or negative I want to copy and paste that number into a new table on a new sheet separating the positive and negative values.
I used a nested if statement to do this originally but instead of getting a list of 20 positive numbers, and 20 negative numbers from my total of 40 numbers I got a list of 20 positive numbers with 20 false conditions in my new positive only table (same thing with the negative).
I would like to pull the positive and negative values without duplicating them, or getting the false condition of the if statement in my new table.
The last thing I have been trying to implement is having this code search through my column of numbers instead of a fixed range so in the future I can add numbers and the new positive/negative tables will automatically generate the additional numbers.
I am fairly new to VBA and coding in general so any help is much appreciated.
Thanks,
Olek!
Aucun commentaire:
Enregistrer un commentaire