Content (before)
Spreadsheet input values altering position
Hi,
It is often the case that new variables will be added to my spreadsheet and I will want to add them to a particular location in the spreadsheet to keep things organised (i.e. inserting a row). However, I can't seem to find a way in simul8 to search by a named range in Excel, which means that this is not possible. This can be a massive error trap, I thought I could maybe find a workaround by using the 'Find' function. I can't seem to find the syntax that would allow me to search a full column in the spreadsheet. Currently I am trying
Find "varaiblename" spreadsheetname[1, ] ... but this does not work
Comments
Was this answer helpful?
0
I got a good robust way to fix this and help avoid any incorrect assignment of variable values ................ there is a function called Search Sheet Area. So you if you put your variable names in a spreadsheet you can search for them and then direct your parameters from there.... for example, make a variable called rowNo and colNo:
Parameters
Search Sheet Area "Search text", Spreadsheet StartCell[left,top], Columns - Number of Columns in the area, Rows - Number of Rows in the area, Returned Column Number i.e. to pass to colNo, Returned Row Number - i.e. to pass to rowNo
example:
Search Sheet Area "variableName", Parameters[1,1], 100, 1, colNo, rowNo
variableName = Parameters[colNo+1,rowNo]
this can really guard against error traps if your parameters sheet goes through changes as the project progresses (which is often the case - particularly for larger projects). It also makes it much easier for checking/verification