0

I have three columns,two are used to calculate the one. I'm using leading 0s for the "waypoint #" and I would like to include them so the Ref # column, its formula is =IF(OR([@[GPS colour]] = "O"), "1", "2")& [@[waypoint '#]].

enter image description here

So the Ref # cells would come out as

enter image description here

2 Answers2

2

One needs to use TEXT to keep the format:

TEXT([@[waypoint '#]],"000")

So:

=IF(OR([@[GPS colour]] = "O"), "1", "2")& TEXT([@[waypoint '#]],"000")

Also it can be simplified:

((@[GPS colour]] <> "O")+1)&TEXT([@[waypoint '#]],"000")
Scott Craner
  • 148,073
  • 10
  • 49
  • 81
-1

To me GPS color looks like a character (O) not a zero (0).

In case there is more than one Character that should be mapped, try this:

enter image description here

=IFNA(INDEX(configMapping[Mapping],MATCH([@[GPS colour]],configMapping[GPS color],0)),fallback) & TEXT([@[waypoint '#]],"000")

where the mapping table is named configMapping and the cell I4 is called fallback

Ike
  • 9,580
  • 4
  • 13
  • 29