sharksandwich
New Member
- Joined
- Jan 4, 2010
- Messages
- 9
Hello to those that take the time to read this and thank you.
I am not asking for anyone to do my homework only I have not been able to find a solution so far.
Scenario: I need a macro/VBA to look in a range of about 20 cells. The cells have an if statement that pulls data from a cell according to date. Some have a value and some have an if function that equals zero. All I am trying to do is keep the value of the cells that have the function greater than zero and not convert value of the if function cells that end up with a zero.
I have a small VBA script to change a cell range to value:
<TABLE style="WIDTH: 234pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=312><COLGROUP><COL style="WIDTH: 234pt; mso-width-source: userset; mso-width-alt: 11410" width=312><TBODY><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #e0dfe3; BORDER-LEFT: #e0dfe3; BACKGROUND-COLOR: transparent; WIDTH: 234pt; HEIGHT: 15.75pt; BORDER-TOP: #e0dfe3; BORDER-RIGHT: #e0dfe3" class=xl63 height=21 width=312>Sub Values_3()
</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #e0dfe3; BORDER-LEFT: #e0dfe3; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #e0dfe3; BORDER-RIGHT: #e0dfe3" class=xl63 height=21>Range("A1:D1").Value = Range("A1:D1").Value</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #e0dfe3; BORDER-LEFT: #e0dfe3; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #e0dfe3; BORDER-RIGHT: #e0dfe3" class=xl63 height=21>End Sub
I am looking to turn it into a loop that will end if the value is zero while converting existing data or greater than 0 data to value only within in the range.
Any suggestions?
Thanks in advance.
</TD></TR></TBODY></TABLE>
I am not asking for anyone to do my homework only I have not been able to find a solution so far.
Scenario: I need a macro/VBA to look in a range of about 20 cells. The cells have an if statement that pulls data from a cell according to date. Some have a value and some have an if function that equals zero. All I am trying to do is keep the value of the cells that have the function greater than zero and not convert value of the if function cells that end up with a zero.
I have a small VBA script to change a cell range to value:
<TABLE style="WIDTH: 234pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=312><COLGROUP><COL style="WIDTH: 234pt; mso-width-source: userset; mso-width-alt: 11410" width=312><TBODY><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #e0dfe3; BORDER-LEFT: #e0dfe3; BACKGROUND-COLOR: transparent; WIDTH: 234pt; HEIGHT: 15.75pt; BORDER-TOP: #e0dfe3; BORDER-RIGHT: #e0dfe3" class=xl63 height=21 width=312>Sub Values_3()
</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #e0dfe3; BORDER-LEFT: #e0dfe3; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #e0dfe3; BORDER-RIGHT: #e0dfe3" class=xl63 height=21>Range("A1:D1").Value = Range("A1:D1").Value</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #e0dfe3; BORDER-LEFT: #e0dfe3; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #e0dfe3; BORDER-RIGHT: #e0dfe3" class=xl63 height=21>End Sub
I am looking to turn it into a loop that will end if the value is zero while converting existing data or greater than 0 data to value only within in the range.
Any suggestions?
Thanks in advance.
</TD></TR></TBODY></TABLE>