Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
checking the content of a cell if it starts with certain character
I want to calculate something if the content of the reference cell begins
with "PN" I tried to use "if" formula as below ; if A2=PN# or * but it did not work I will be gled if somebody help me thanks timur |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
checking the content of a cell if it starts with certain character
=IF(LEFT(A2,2)="PN",B2*3,"no way")
=IF(LEFT(A2,2)="PN",B2*3,"") But IF is not needed if you can live with zero when there is no PN =(LEFT(A2,2)="PN")*(B2*3) best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "Timur" wrote in message ... I want to calculate something if the content of the reference cell begins with "PN" I tried to use "if" formula as below ; if A2=PN# or * but it did not work I will be gled if somebody help me thanks timur |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
checking the content of a cell if it starts with certain character
Sub timur()
v = Selection.Value If Left(v, 2) = "PN" Then MsgBox ("found PN") End If End Sub -- Gary''s Student - gsnu200735 "Timur" wrote: I want to calculate something if the content of the reference cell begins with "PN" I tried to use "if" formula as below ; if A2=PN# or * but it did not work I will be gled if somebody help me thanks timur |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Checking for cell content | Excel Programming | |||
Checking a String's last character | Excel Programming | |||
Checking to see whether a string contains a certain character | Excel Programming | |||
Checking for non-numerical content in a cell | Excel Programming | |||
split cell content without using a specific character/sign | Excel Programming |