Hi all,
Quite new to VBA and have spent all morning trying to solve a problem with the following script:
In summary, it replaces all placeholders (e.g. [NAME]) in range B14:B105 on the 'Builder' sheet with the actual value defined on the 'Conditions' sheet. Doing so, it looks up another value (languages) on the 'Builder' sheet to understand a) what to replace with and b) from what language column on the 'Conditions' tab (each column represents one language with the actual values for each placeholder listed below in rows).
So far so good - all working as expected. Now I have the issue that some of the cells (i.e. the actual values) on the 'Conditions' sheet contain formulas I need to use to format the cell for left to right languages (global settings of the Excel spreadsheet are right to left). Note: Builder!$E$7 contains the source value (in this case 5%). An example:
This renders (in the cell on the 'Conditions' tab) as %5 بنسبة(which is correct), however, when I execute the above script and it replaces the placeholder (in this case the placeholder is [%off]) with the actual value (should be %5 بنسبة), it seems to ignore the formatting set by the formula and pastes the value as 5%, which is not correct (as it pastes the value as right to left and not as left to right as defined on the 'Conditions' tab).
I believe that the following part of the script needs to change in order to replace the placeholders with the actual value (i.e. value as is, maybe rendered as text?) from the conditions tab.
Is there anything I can add to or change in SpecialCells(xlFormulas, xlErrors) to actually replace the value exactly as it is? Or any other idea? Tried all different xl...'s I could find on the net, but no luck so far (some even break the script).
Hope you can help?
Bookmarks