Hi
I've been struggling with this...
I have a dynamic worskheet "Budget" containing sales data.
Idea is to be able to store data with cost. Cost depend on the customer / supplier combination.
Eg. Customer (cuno) = 15 and Supplier (suno) = 494
Worksheet("Data")
Column A contains customer no (cuno)
Column B contains supplier no (suno)
Columns C, D, etc contain various data relating to this cuno/suno combination
to find the combination I've been using
If combination exist then overwrite data from "Budget"
if combination does not exist, create new line in "Data"
But I cannot get my head around how to determine if the combination doesn't exist without creating 1000 new lines
Any help appreciated
I've been struggling with this...
I have a dynamic worskheet "Budget" containing sales data.
Idea is to be able to store data with cost. Cost depend on the customer / supplier combination.
Eg. Customer (cuno) = 15 and Supplier (suno) = 494
Worksheet("Data")
Column A contains customer no (cuno)
Column B contains supplier no (suno)
Columns C, D, etc contain various data relating to this cuno/suno combination
to find the combination I've been using
VBA Code:
For Each Curng In wsdata.Range("A1:A1000")
If Curng.Value = cuno And Curng.Offset(0, 1).Value = suno Then
If combination exist then overwrite data from "Budget"
if combination does not exist, create new line in "Data"
But I cannot get my head around how to determine if the combination doesn't exist without creating 1000 new lines
Any help appreciated