Quantcast
Channel: SCN : Unanswered Discussions - Supply Chain Management (SAP SCM)
Viewing all articles
Browse latest Browse all 5579

Macro using SUM function with Row & Column Relative

$
0
0

Hello Gurus,

 

I am trying to write a macro for the following scenario and below that is what i have so far.

 

             Col 1Col 2Col 3Col 4Col 5Col 6Col 7Col 8

Col 9

KF1380200

KF2

2001005018050505050

 

 

When macro reads value in KF1, it should sum up the values of KF1 & KF2 until that column.

If the sum(KF2) <  sum(KF1) value, turn KF1 Cell to RED.

 

 

IF

Condition

KF1 > 0 (Frm Col1)

AND

(

Function SUM (KF1 Col1, KF1 Col9)  [ Row Relative & Column Relative set for TO]

-

Function SUM ( KF2 Col1, KF2 Col9) [ Row Relative & Column Relative set for TO]

> 0 )

Attribute ( KF1) = RED    

ENDIF



I have not checked the row relative & column relative for the from row for both Key Figures since i want the calculation to start from Col1 for each iteration and progress the TO based on iteration column. The macro just turns all KF1 cells which have values to Red. Tried mix and match with Row/Column relative but nothings working so far. Appreciate your inputs.





Regards

AK


Viewing all articles
Browse latest Browse all 5579

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>