Hi. I'm new to this forum AND macros in general (other than a c++ class in high school many years ago), so please bear with me. I have a feeling this is very simple, but massive amounts of googling has not helped me.
I have a worksheet with values in column A (names of cities) and numbers in column B (number or referrals branches in said cities we have received). Now many of these branches have not given any referrals yet, so their B column is 0.
I'm trying to write a macro to copy all the non-0 referrals from one sheet to another.
So basically:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Branch[/TD]
[TD]Referrals[/TD]
[/TR]
[TR]
[TD]Atlanta Dunwoody[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Austin (AUS)[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]AUSTIN DOWNTOWN[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BELLEVUE (BEL)[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Berkeley[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
Needs to be copied into a new sheet as:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Branch[/TD]
[TD]Referrals[/TD]
[/TR]
[TR]
[TD]Austin (AUS)[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]BELLEVUE (BEL)[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance!
Also, I currently have the 0's in column B hidden (format cells 0;-0;;@). And column B integers are from a countif from yet another sheet. I don't know if that would affect the macro or not.
EDIT:
I don't think this is possible as a simple IF function in the formula of the new sheet, but if it is please let me know too.
I have a worksheet with values in column A (names of cities) and numbers in column B (number or referrals branches in said cities we have received). Now many of these branches have not given any referrals yet, so their B column is 0.
I'm trying to write a macro to copy all the non-0 referrals from one sheet to another.
So basically:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Branch[/TD]
[TD]Referrals[/TD]
[/TR]
[TR]
[TD]Atlanta Dunwoody[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Austin (AUS)[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]AUSTIN DOWNTOWN[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]BELLEVUE (BEL)[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Berkeley[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
Needs to be copied into a new sheet as:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Branch[/TD]
[TD]Referrals[/TD]
[/TR]
[TR]
[TD]Austin (AUS)[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]BELLEVUE (BEL)[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance!
Also, I currently have the 0's in column B hidden (format cells 0;-0;;@). And column B integers are from a countif from yet another sheet. I don't know if that would affect the macro or not.
EDIT:
I don't think this is possible as a simple IF function in the formula of the new sheet, but if it is please let me know too.