store different values into two variables from rotary encoder [SOLVED]

here is one suggestion from another forum. forcing the counter1 value to the saved vairable. Works once but on the next loop the value goes crazy.

while (Inconfig == 1)
  {
    //wait for keypress to move selector
    ENC_SWstate = digitalRead(ENC_SW);
    if (ENC_SWstate != prevENC_SWstate)
    {
      if (ENC_SWstate == LOW)
      {
        select += 1;
        select = select % 4;
      }
      switch (select)
      {
      case 0:
        noInterrupts();
        Counter1 = w1Value;
        interrupts();
        break;
      case 1:
        noInterrupts();
        Counter1 = w2Value;
        interrupts();
        break;
      case 2:
        noInterrupts();
        Counter1 = pValue;
        interrupts();
        break;
      }
      prevENC_SWstate = ENC_SWstate;
    }

So there were two problems,

One was the fact the every time the enoder was read the value was shifted by one to the right.

int readEncoder()
{
  noInterrupts();
  int copyCounter = Counter1;
  interrupts();
  return (copyCounter) >> 1;
}

Second, was that it was multiplied by 10. So to overcome Counter1 was forced to take the value of the particular variable during a button press, then divided by 10 and shifted a bit to the left.

prevENC_SWstate = ENC_SWstate;
  while (Inconfig == 1)
  {
    //wait for keypress to move selector
    ENC_SWstate = digitalRead(ENC_SW);
    if (ENC_SWstate != prevENC_SWstate)
    {
      if (ENC_SWstate == LOW)
      {
        select += 1;
        select = select % 4;
        if (select == 0)
        {
          noInterrupts();
          Counter1 = w1Value / 10 << 1;
          interrupts();
        }
        if (select == 1)
        {
          noInterrupts();
          Counter1 = w2Value / 10 << 1;
          interrupts();
        }
        if (select == 2)
        {
          noInterrupts();
          Counter1 = pValue / 10 << 1;
          interrupts();
        }
      }
      prevENC_SWstate = ENC_SWstate;
    }