Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How to deal with "$0 - $500" in one cell

A spreadsheet has multiple cells filled with the ranges like "$0 -
$500" or "$501 - $1000" or "Jan 2006 - March 2006".

Is there a way to make judgement programmatically (either using
function or procedure) to determine if a value falls in the range?

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How to deal with "$0 - $500" in one cell

v = application.Split(cell.Value,"-")
lb = clng(trim(v(0))
ub = clng(trim(v(1))
if v = lb and v <= ub then
' it's between

--
Regards,
Tom Ogilvy


"Who I Am" wrote:

A spreadsheet has multiple cells filled with the ranges like "$0 -
$500" or "$501 - $1000" or "Jan 2006 - March 2006".

Is there a way to make judgement programmatically (either using
function or procedure) to determine if a value falls in the range?

Thanks in advance.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I deal with a "Too many different cell formats". Paul Gauci Excel Discussion (Misc queries) 10 January 29th 07 02:49 AM
How do I deal with a "Too many different cell formats". Paul Gauci Excel Worksheet Functions 1 January 7th 07 10:17 AM
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! [email protected] Excel Discussion (Misc queries) 3 January 5th 07 02:18 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM


All times are GMT +1. The time now is 05:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"