using cellput to put the same value in 2 element values

Post Reply
M1ndbender
Posts: 26
Joined: Mon Jul 19, 2021 2:15 pm
OLAP Product: TM1
Version: 2.0.0
Excel Version: 365

using cellput to put the same value in 2 element values

Post by M1ndbender »

I have a cell put on the data tab of a process. What i need is the Rate Value to be put against 2 elements.

Where it says if SourceNum @= 1 I want to put that Rate into values of 1 and 3 in the Price Rate dimension

Everything I have tried has not worked and google has been no help. Is this possible?

Code: Select all

IF (vSourceNum @= '1');
    CellPutN( Value,
        vTargetCube,
        Period, 
        vcompany ,
        '1',  AND 3
        product,
        'Rate');
ELSEIF (vSourceNUM @= '2');
    CellPutN( Value,
        vTargetCube,
        Period, 
        vcompany ,
        '2', 
        product,
        'Rate');
ENDIF;
MarenC
Regular Participant
Posts: 356
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: using cellput to put the same value in 2 element values

Post by MarenC »

Hi,

Why not have 2 cellputs within the

Code: Select all

IF (vSourceNum @= '1')
section;? One for Price Rate 1 and one for Price Rate 3?

Maren
Adam
Posts: 103
Joined: Wed Apr 03, 2019 12:10 am
OLAP Product: IBM PA
Version: 2.0.9.x
Excel Version: Microsoft 365 x64

Re: using cellput to put the same value in 2 element values

Post by Adam »

Try repeating CellPutN function, once with ‘1’ AND once with ‘3’.
Take care.
Adam
M1ndbender
Posts: 26
Joined: Mon Jul 19, 2021 2:15 pm
OLAP Product: TM1
Version: 2.0.0
Excel Version: 365

Re: using cellput to put the same value in 2 element values

Post by M1ndbender »

Thank you. I did not try putting 2 cellputs under the if. I had tried a second if with the same criteria that did not work.

This appears to be working now
Thank you for the help
Post Reply