Thread: VBA
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default VBA

Hi

Did you try Barb's elegant solution?
It works just fine.
The only thing that is in A1, is whatever you type in there. The
remainder is merely formatting.

--
Regards

Roger Govier


"NOOBY92" wrote in message
...
The problem with your solution (correct me if I'm wrong) is that A1
has other
characters besides the variable (x). So A1 will never be blank. That
is why I
want to be able to make a character (x) a variable.

"Barb Reinhardt" wrote:

You don't really need VBA to do what you want.

Did you try this in A2 ?

Format - Cells - Custom

"Next Week ("0")"

In A2, put this:

A2: =IF(ISBLANK(A1),"",A1+1)

If you want a VBA solution, come back and let us know.


"NOOBY92" wrote:

Hello, I am completley new to Visual Basic. I have XP SP2 and Excel
2002 Here
is what I need.

I want to make a regular character (for example "x") a variable.
Then I want to use that variable in other cells.
For Example.

Cell A1- Week x /I want to make x a variable/
Cell A2- Next Week (Week ) /I want "x+1" to appear after "(Week
" but I
don't want anything to appear after "(Week " until the value for X
is
determined/


Thank You Very Much