Hello everyone.
Given:
Columns P and Q
Column P contains random values (Number Format) interspaced with unknown number of empty cells
The aim is to write code which returns value into “Q” Cell and fulfils criteria as it follows below:
If P Cell value = Nothing then Q Cell value = Nothing
If P Cell value > 0 then Q Cell value = (Next P Cell value (down the column) if it is > 0 – Current P Cell value)/Current P Cell value
For Example:
“P2” = “””” “Q2” = “”””
“P3” = 50 “Q3” = (150 – 50)/50
“P4” = “””” “Q4” = “”””
“P5” = “””” “Q5” = “”””
“P6” = 150 “Q6” = (80 – 150)/80
“P7” = “””” “Q7” = “”””
“P8” = 80 “Q8” = “””” if the rest of the values of Column P = “”””
I tried to use Formula:
FormulaR1C1 = " = IF (AND ( RC [-1] = “””” ), """" , IF ( AND ( RC [-1] > 0 ),""Text message"",""""))"
But I did not know how to incorporate FIND function instead of “Text message”
Would be grateful for any suggestions.
Thanks in advance.
Dil
Given:
Columns P and Q
Column P contains random values (Number Format) interspaced with unknown number of empty cells
The aim is to write code which returns value into “Q” Cell and fulfils criteria as it follows below:
If P Cell value = Nothing then Q Cell value = Nothing
If P Cell value > 0 then Q Cell value = (Next P Cell value (down the column) if it is > 0 – Current P Cell value)/Current P Cell value
For Example:
“P2” = “””” “Q2” = “”””
“P3” = 50 “Q3” = (150 – 50)/50
“P4” = “””” “Q4” = “”””
“P5” = “””” “Q5” = “”””
“P6” = 150 “Q6” = (80 – 150)/80
“P7” = “””” “Q7” = “”””
“P8” = 80 “Q8” = “””” if the rest of the values of Column P = “”””
I tried to use Formula:
FormulaR1C1 = " = IF (AND ( RC [-1] = “””” ), """" , IF ( AND ( RC [-1] > 0 ),""Text message"",""""))"
But I did not know how to incorporate FIND function instead of “Text message”
Would be grateful for any suggestions.
Thanks in advance.
Dil