Lee has attended:
Excel VBA Intro Intermediate course
Copying Records
Is it possible for the content of a cell to be copied if the value of the cell is greater than zero ?
we created a code that had the following to copy the data in the cell if the salesperson name matched strName
If Sheets("Total Sales").Range("a10").Cells(introwcount, 10).Value = strName Then
Can the last bit be changed to somehting like this
If Sheets("Total Sales").Range("a10").Cells(introwcount, 10).Value = > 0
to copy all the content when the value of the cell is greater than zero
The code i have given below still copies all records even when there is a "0" in the reference cell.
Thanks
Lee
RE: Copying Records
Hi Lee
Thanks for your question
your code
If Sheets("Total Sales").Range("a10").Cells(introwcount, 10).Value = > 0
Is copying it if it is greater than OR equal to 0
Try
If Sheets("Total Sales").Range("a10").Cells(introwcount, 10).Value > 0
(without the = )
Instead
Regards
Stephen