ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing Value of Cells (https://www.excelbanter.com/excel-programming/363647-changing-value-cells.html)

williamr

Changing Value of Cells
 
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

Chip Pearson

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





All times are GMT +1. The time now is 07:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com