As of now I have an IF function in VBA that references column locations - eg. IF(R4=1,"Complete",SUM(AB4:AB1000))
There will be situations where I can't reference columns R or AB because sometimes columns get deleted. I would need to reference columns called CompletionLevel (this is column R normally, but won't always be) and Quantity (this is column AB normally, but won't always be). The column headers that I want to reference will always be in row 3.
I think I'll need to use the Find function but I'm not totally sure how to write what I need in VBA. Would I need to define these columns at the start of my code, and how would I specify that I want it to look at the cell right under the column header (aka R4 and AB4:AB1000)?
There will be situations where I can't reference columns R or AB because sometimes columns get deleted. I would need to reference columns called CompletionLevel (this is column R normally, but won't always be) and Quantity (this is column AB normally, but won't always be). The column headers that I want to reference will always be in row 3.
I think I'll need to use the Find function but I'm not totally sure how to write what I need in VBA. Would I need to define these columns at the start of my code, and how would I specify that I want it to look at the cell right under the column header (aka R4 and AB4:AB1000)?