How to set the cursor on the LCD using a variable?

I need to have the cursor move on my LCD based off a variable but what I am trying doesn't work. Is it possible to set the lcd cursor with a variable in the positions?

Here is what won't work for me:
lcd.setCursor(varibale goes here, 0);

Show what you really tried, not:

  lcd.setCursor(**varibale goes here**, 0);

Do you get a compile error, or does it compile but not do what you expect?

Here is a line of code from a program of mine:-

    lcd.setCursor(4 + menuTitle[m].length(), 1);

That is using a variable to set a cursor.

Post all you code using the code tags so we can see what you are doing wrong.

int set;
char ch;

void loop() {
  delay(5000);
   /////////////////////////String 1 length//////////////////////////////////
   if( Serial.available() ) {
   ch = Serial.read();
   set = ch;
   lcd.setCursor('set', 0);
   }

'set' is a multi byte character constant, "set" is a string.

What you want is just the variable:

lcd.setCursor( set, 0);

lcd.setCursor(set, 0) doesn't work eiter, i'm getting no print out at all.

lcd.setCursor(col, row) does what it sounds like. Sets the cursor position on the lcd.
The next character printed will be placed at that location.
Your code never prints any characters which is why you never see anything.
It reads a character from the serial port then uses the numeric code of that character to
set the cursor position to that column on row zero.

Have quick read of the LiquidCrystal functions to get a better feel of the
routines available to see what will do what you want.

--- bill

So now you showed us what you have and what is "not working", what is it that you want? You sound like a customer scrolling into a shop and just can't describe to the clerk what you are in the store for. You won't be treated nicely after a while.

Bruce,
One thing you might not be aware of is by default the actual cursor is invisible.
If you want to see the cursor the cursor() function will turn it on.

--- bill

Serial read returns the ASCII value of the character sent. So if you send a 1 then number you recieve is 39, so when you do that right the cursor will move to position 39. Will you be able to see that?

Here is what won't work for me:

turn on the cursor and then go to the spot you want.