Runge Forums  

Go Back   Runge Forums > XACT Forums > General XACT Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 31-May-2010, 06:31 AM
Jon Scott Jon Scott is offline
Mining Engineer (Runge)
 
Join Date: Jun 2005
Location: Australia
Posts: 111
Thumbs up Replacing code in expressions with Excel substitute

Rather than use find replace or the text editor to replace code A with code B...consider using the substitution function in Excel.

I used an expression to populate data from one database to a new database.
This expression was repeated a number of times and would have been time consuming and/or prone to human error to change....the working expression for datafield 1 was a look up as follows....

GetValue(Field1, "Top\" + sYearName + "\" + sQuarterName + "\" + sMonthName + "\" + sWeekName, "Calendar Original")

The substitution function in Excel replaces text from one expression with new text in a text string.

The attached workbook shows a look-up example between two calendars.

I have replaced the rowcode Field1 with all the other fields I needed, then copied the expression back into XACT.

The subsitution function allows you to efficiently replace an expression.

Thanks to Sean Stewart for highlighting this Excel function

Hope this helps


Jon.
Attached Files
File Type: xlsx Forums Example of Substitute.xlsx (9.0 KB, 28 views)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT. The time now is 06:33 PM.


Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.