Cross-posted at https://stackoverflow.com/questions/...nerates-answer --6SJ
Hi
I'm trying to create a form which generates a unique ID which doesn't change, for each row/item.
To do this I am going to use a formula to generate a unique ID but to prevent it from changing later, I would like to create a macro which copies and pastes the cell contents as a value, to remove the formula, once the cell value has been generated. HOWEVER, I want the copy and paste to only work on cells in the column which have a value that isn't blank (e.g., so for empty columns which may be filled later, the formula doesn't get removed).
So far I have
Which copies and pastes the whole table column, but I'm unsure how to add in the 'IF' statement (so if the value is not blank, then do it, if the value is blank, do not copy paste as value).![]()
Please Login or Register to view this content.
Would anyone be able to help me write this? Apologies, it's been a really long time since I last dabbled in VBA.
Equally, if you have a better way of generating a unique ID that doesn't change per row, that isn't a manual task, please let me know!
Bookmarks