Is this possible...freeze entry after lookup

chef

Well-known Member
Joined
Jul 10, 2002
Messages
610
Office Version
  1. 365
  2. 2016
I'm trying to find a solution to an issue

I have a user enter an employee numbers in column I and could be as many as 14500 rows..I have a drop down in column J which is just from data validation.

I then autopulate columns K to T using a vlookup on the entries in column I

The issue I have is that the master dataset changes each month so an employee might be in Dept A this Month and Dept B next month so if I overwrite the masterdataset next month this will overwrite the original entry eg Dept A which I need...

I'm not sure if I am explaining too well...one question is that is there a way to freeze an entry as soon as vookup done and remove the vlookup formula after populated?

I might have to go down the route of various lookups for named ranges for each of the months but the datasets are big and around 14500 rows overall.

Not sure if there is a soultion for this but if anyone has any ideas I would be extremely grateful.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
if you use a helper column which equals 0 if no employees number entered, but 1 if the employee number is present, then a macro will detect the 1's and do a copy, paste special, values on the relevant cells
 
Upvote 0
Thank you for such a quick reply and I like the sound of that..

excuse my in experience with macros and vba....could you expand a little please if you dont mind and spell out how I would do that...

I can get to a helper column and put in formula so as you suggest put in 0 if no employee entered yet then a 1 if an employee number enterered.

So what do I do next re this macro to do a copy paste special?

im not really familiar with using macros/vba so a little nudge would be really helpful

grateful for any help
 
Upvote 0
numbernamedetail1detail2detail3helper
12323451
34523451
0the first one in helper column
0obtained by
0=IF(E2="",0,1)
0
there are formulas in rows 2 to 7
assume the stuff in the details columns is from lookups
(it was to start with being either blank or a look up value)
this macro makes the values permanent
Sub Macro4()
'
' Macro4 Macro
' Macro recorded 13/04/2018 by bob
'
'
For j = 2 To 7
If Cells(j, 9) = 0 Then GoTo 50
For k = 1 To 4
Cells(j, k) = Cells(j, k)
Next k
50 Next j
End Sub
if you add a new number in row 4
just run the macro again

<colgroup><col width="64" span="18" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,388
Messages
6,119,226
Members
448,878
Latest member
Da9l87

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