signoreexcel
New Member
- Joined
- Jun 14, 2013
- Messages
- 7
I would like to use VBA to automate something I do a lot, but my knowledge of VBA is not much, so I would appreciate some help.
What I want to do:
Search column 8 for 0's (only one digit in the cell and it is a zero, not looking for zeros as in 10, 101, 0.01 etc.), and if found then check column 9 to see if it is non-zero. If it is, then change the 0 in column 8 to a 1.
If this change is made, then, in column 10 do the following calculation: log2 of (column9/column8).
I then want to do the same for column 9. That is, search for a lone 0, this time check column 8 to see if it is non-zero, if so, change the 0 in column 9 to a 1, and do the same calculation in column 10: log2 (column9/column8).
Length of all columns will be the same, but this length will be variable and go up to 33,000 rows.
When finished, I would like to select everything in column 10 (they will all be numbers) and change to one decimal place (for example, 9.3, 3948.1, 0.4, 5.4, etc.).
What I want to do:
Search column 8 for 0's (only one digit in the cell and it is a zero, not looking for zeros as in 10, 101, 0.01 etc.), and if found then check column 9 to see if it is non-zero. If it is, then change the 0 in column 8 to a 1.
If this change is made, then, in column 10 do the following calculation: log2 of (column9/column8).
I then want to do the same for column 9. That is, search for a lone 0, this time check column 8 to see if it is non-zero, if so, change the 0 in column 9 to a 1, and do the same calculation in column 10: log2 (column9/column8).
Length of all columns will be the same, but this length will be variable and go up to 33,000 rows.
When finished, I would like to select everything in column 10 (they will all be numbers) and change to one decimal place (for example, 9.3, 3948.1, 0.4, 5.4, etc.).