fry
Active Member
- Joined
- Apr 25, 2007
- Messages
- 411
Hi Guys
A small problem with if.......then but I can't work out how to do it...
I have a user inputted variable 'ipt' that could be a number or text.
If its a number I want to add 'C20' to it (eg 480 becomes C20480), but if its text I want to leave it as it is.
I can happily add the 'C20' bit but I'm not sure how to check if its text so in my words I'd like to do the following
If ipt = 'a number' then ActiveCell.FormulaR1C1 = "C20" + ipt
I just dont know what the 'a number' syntax would be in VBA
All help, great or small is much appreciated
A small problem with if.......then but I can't work out how to do it...
I have a user inputted variable 'ipt' that could be a number or text.
If its a number I want to add 'C20' to it (eg 480 becomes C20480), but if its text I want to leave it as it is.
I can happily add the 'C20' bit but I'm not sure how to check if its text so in my words I'd like to do the following
If ipt = 'a number' then ActiveCell.FormulaR1C1 = "C20" + ipt
I just dont know what the 'a number' syntax would be in VBA
All help, great or small is much appreciated