View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Changing Value of Cells

Try

If (Mid(Range("C3").Value, 10, 1)) = "1" Then
Range("D3").Value = "U"
Else
Range("D3").Value = "D"
End If

You could use a formula in D3:

=IF(MID(C3,10,1)="1","U","D")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"williamr" wrote in message
...
I want to change the value of cell D3 based on the value of the
10 position
of C3. If C3 is a "1" I want to put the word "UP" if not I
want to put the
word "Down. I tried this

If (Mid(C3, 10, 1)) = "1" Then
D3 = "U"
Else
D3 = "D"
End If

Should I enter something into the cell directly and not use
VBA?
What command should I use? Is there a book that explans the
key words and
what they do and how to use them??

Thanks in Advance