![]() |
Looping Question
I would like to create a specific inventory "number" based on values the user
selects and one portion of the number would need to be the date the entry was made - I planned to accomplish the dating portion this via the =NOW command. Via =CONCATENATE, I have the desired, unique part number. My issue is, by using the =Now command, each time I access the file, the part name changes. So, before saving and closing the workbook, via looping through the entries, I want to paste special the value of the computed name, so it becomes a static name. Assuming the computed name is in cell A1, and derived from user input in cells B1 and C1, I would like to create a loop to basically say, "If there is a value in B1 and C1, then copy the content of A1, and paste special the value into cell A1. If the B1 and C1 and not valued, do nothing (ie keep the concatenating formula). I would need this to loop through 500 rows of data. Any and All Help Will Be Appreciated - Thanks In Advance!!!! |
Looping Question
Try something like the following:
Dim Rng As Range For Each Rng In Range("A1:A500") '<<< CHANGE If Rng(1, 2).Value < "" And Rng(1, 3) < "" Then Rng.Value = Rng.Value End If Next Rng "MWS" wrote in message ... I would like to create a specific inventory "number" based on values the user selects and one portion of the number would need to be the date the entry was made - I planned to accomplish the dating portion this via the =NOW command. Via =CONCATENATE, I have the desired, unique part number. My issue is, by using the =Now command, each time I access the file, the part name changes. So, before saving and closing the workbook, via looping through the entries, I want to paste special the value of the computed name, so it becomes a static name. Assuming the computed name is in cell A1, and derived from user input in cells B1 and C1, I would like to create a loop to basically say, "If there is a value in B1 and C1, then copy the content of A1, and paste special the value into cell A1. If the B1 and C1 and not valued, do nothing (ie keep the concatenating formula). I would need this to loop through 500 rows of data. Any and All Help Will Be Appreciated - Thanks In Advance!!!! |
All times are GMT +1. The time now is 05:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com