using a symbol preceding a number to = 1/2 the number value

Joe1017

New Member
Joined
Mar 14, 2016
Messages
3
Is there a way to use a symbol < in excel preceding a number to equal half of that number's value?
Example: <1+<2=1.5
.5+1=1.5
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Sure, with this UDF:

Code:
Function EvalAsHalf(r As String)
EvalAsHalf = Evaluate(Replace(r, "<", ".5*"))
End Function

<b>Sheet1</b><br /><br /><table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:64px;" /><col style="width:64px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td ><1+<2</td><td style="text-align:right; ">1.5</td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b>Spreadsheet Formulas</b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >B1</td><td >=EvalAsHalf(A1)</td></tr></table></td></tr></table> <br /><br />
 

Joe1017

New Member
Joined
Mar 14, 2016
Messages
3
I NEED A FORMULA THAT WILL RECOGNIZE THE < SYMBOL HERE IS A PICTURE. file:///C:/Users/Joe/Downloads/Screenshot_20160314-190955.webp
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
5,935
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

I NEED A FORMULA THAT WILL RECOGNIZE THE < SYMBOL HERE IS A PICTURE. file:///C:/Users/Joe/Downloads/Screenshot_20160314-190955.webp

Hi,

That is a link to YOUR computer hard drive, unless you also post your street address, no one will be able to see it. You need to upload to a file server.

If the cell in question contains only one value, then:

<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="25px" style="background-color: #DAE7F5" /><col /><col /></colgroup><thead><tr style=" background-color: #DAE7F5;text-align: center;color: #161120"><th></th><th>A</th><th>B</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style=";"><2568</td><td style="text-align: right;;">1284</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">B1</th><td style="text-align:left">=IF(<font color="Blue">LEFT(<font color="Red">A1,1</font>)="<",RIGHT(<font color="Red">A1,LEN(<font color="Green">A1</font>)-1</font>)/2,""</font>)</td></tr></tbody></table></td></tr></table><br />
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
=SUM(IF(LEFT(D2:D29)="<",MID(D2:D29,2,255)*0.5,D2:D29))

Confirm with CTRL-SHIFT-ENTER rather than just Enter
 

Watch MrExcel Video

Forum statistics

Threads
1,127,586
Messages
5,625,658
Members
416,124
Latest member
DeMoNloK

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top