Follow-up to Logical Test Question

L

Lance

Cell GR456 contains the following logical test:
=IF(GQ456="CCPM",GJ459+12,GJ459). When CCPM is the option, I want the value
in GJ459 to increment by 12 i.e. 0001 should be 0013. That does not happen.
The value remains 0001 whether the option is CCPM or another value. How do I
get the value in GJ459 to increment by 12 when CCPM is the option.
 
G

Guest

Hi

You'll have to have a formula in GJ459. But you can't have a formula and a
value. You could have this formula in there:
=IF(GQ456="CCPM",13,1)
which will show 1 unless CCPM is in GQ456, and then it would show 13

Andy.
 
N

Niek Otten

There may be spaces or other invisible characters in GQ456. Try to re-enter.
And check Tools >Options>Calculation tab; calculation should be Automatic.
 
L

Lance

Respectfully, I understand that Ardus. I am looking for a formula or If
statement that will increment and display in Cell GR456 the value of Cell
GK460 by 12 when "CCPM" is the option in Cell GQ456. Keep in mind that the
value in Cell GK460 changes
 
L

Lance

Thanks Andy, Your response helps to explain the reason why I am not getting
the expected result, but, I probably asked the wrong question. I am looking
for a response that derives the expected result.
 
B

Beege

Lance

GQ456 is CCPM or some other value, yes?

You want GJ459 to increment, so you need a formula in GJ459 like:
=IF(GQ456="CCPM",TEXT(13,"0000"),TEXT(1,"0000"))

A formula in GR456 will not change a value in another cell (GJ459?)
If you want to use GR456 for the initial number (0001) then the formula in
GJ459 would change to:

=IF(GQ456="CCPM",TEXT(GR456+13,"0000"),TEXT(GR456,"0000"))

Beege
 
L

Lance

Beege,

I don't want the formula in GR456 to change a value in another cell (GJ459).
I do want whatever value in GJ459 to be incremented by 12 and display in
GR456. In other words the value in GJ459 appears in GR456 add it by 12 and
display the value in GR456 when the value in GQ456 is CCPM. If GQ456 is a
value other than CCPM GR456 will display the same value as GJ459.
 
B

Beege

So, then, in GR456
=IF(GQ456=TRIM("CCPM"),TEXT(GJ459+12,"0000"),TEXT(GJ459,"0000"))

Does this work?

Beege
 
L

Lance

Beege,

That test doesn't increment the value plus 12. It displays the same value
0000 whether the value of GR456 is CCPM or another value.

Thanks
 
B

Beege

Lance,

So I don't understand. It works in my spreadsheet. What is in GJ459?
Formula? Text? Number?

Put the last part there in an empty cell; =TEXT(GJ459,"0000")
That should display the "number" as 000#
The "0000" above is for number format to keep leading zeroes...

Beege
 
L

Lance

Beege,

The following is what is in GJ459. And that reference is to a cell in
another spreadsheet that contains numbers that change by an increment of 32.


=IF('Master Input Table'!$D$10="","",'Master Input Table'!$D$10)
 
Top