assign value before macros starts

lionginass

New Member
Joined
Jul 29, 2016
Messages
24
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!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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?
 
Upvote 0
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?
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,536
Members
449,037
Latest member
tmmotairi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top