Forum Discussion
Getting data from variable input
MahsumT Question is little bit unclear. Give a try-
=MID(XLOOKUP("*"&A4&"*",A1:A2,A1:A2,,2),SEQUENCE(,4,5,4),4)
The purpose of this table is to receive data from the field and transfer it to the monitoring station. All the data from the field will be read as a text, and I will assign this data to cell A1. Periodically, A1 will be updated with new data. At this stage, based on the first 4 characters of the data in A1, it will go to the corresponding row and append the remaining 4 characters next to it, similar to what you've described.
However, there are two issues here. Let me provide an example. Suppose a text "1001m365excl" is received. It will go to the row with "1001" and append the remaining numbers next to it. Then, "100220013001" comes in. It will go to the row with "1002" and append the remaining numbers. Importantly, the information written in the "1001" row should not be deleted; it should remain until the next reading.
- OliverScheurichJan 25, 2024Gold Contributor
Does the attached sample file work as intended? In cell A1 you can enter the variable data and then you can click the button in cell C1 to run the macro which enters the data in the table. The information for a data point is saved in the table until it's updated with new data in cell A1 (that is entered to the table by running the macro).