assign value before macros starts

lionginass

New Member
Joined
Jul 29, 2016
Messages
23
Hi,

Have an issue which i cannot google my self.

Lets say i have a table A1:B10, which updates automatically when the button is pressed.
Range C1:C10 is updated manually.
F.ex A5 = Soccer, B5 = Europe. My colleague John is working with all the projects from Europe, so he manually writes his name in cell C5.
Problem occurs when the table updates and "Soccer" and "Europe" is no longer in cells A5 and B5, but in A8 and B8, but name John unfortunately stays in C5.
Normally i would create a new sheet where i could assign name to a project, and then lookup the value in column C, but my boss did not accept this idea. (dont ask why :))

So is it possible to create a vba code which remembers C columns value regarding A column value and then lookup old values after the main code runs.
Tried to google it but can not find any good info.
I dont ask to write a code, i am just asking for tips where i could find related info.. maybe there is a word which describes what i need.
thanks!
 

Some videos you may like

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
L

Legacy 456155

Guest
The values in column A and B. Are they unique within their column or as a composite? In other words, will "Soccer" only appear one time in column A? Or will Europe only appear one time in column B? Or will "Soccer" and "Europe", together, only appear one time as a composite? We might be trying to cure a symptom, but, for now, is there any way of identifying each row?
 

lionginass

New Member
Joined
Jul 29, 2016
Messages
23
They are not a composite. "Soccer" is not important at all. John should appear in the same line as europe after refreshing A1:B10.

I come up with an idea to copy whole A and C column, paste it to lets say X and Y colums, run the code, and then lookup values from Y column and delete X and Y columns after all. Or it is a more professional way to do it?
 
L

Legacy 456155

Guest
Or it is a more professional way to do it?

I don't know. There are any number of ways to associate your columns. Your idea may be as good an any other. I don't see the need to move data around in cells. Just put it in memory and use it there. I'm not going to work up an example because I don't understand enough about your project.
 

Watch MrExcel Video

Forum statistics

Threads
1,114,032
Messages
5,545,626
Members
410,696
Latest member
JTrehan
Top