#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default if statment

not sure on how to do this, got 2 columns first has a dollar value, second
has the formula, the dollar value has both pos and neg value, based on what
value is in will return a word,
so +/- 1-500=tl +/-501-2000=ss and so on
I came up with this wich works for the pos but has to work for the neg as well
=if(and(a10,a1<501),"tl",if(and(a1500,a1<2000)," ss","")) and so on, is
there a way that the formula can be put in with out having to go something
like,
=if(and(a10,a1<5001,a1-501,a1<-0),tl,"") and so on
it's to look something like this
a1 $200 b1 tl
a2 $600 b2 ss
a3 -$300 b3 tl
a4 -$1000 b4 tl



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RFJ RFJ is offline
external usenet poster
 
Posts: 25
Default if statment

You could create an additional column next to your dollar column with the
formula =ABS(xx) where xx is the ref of the cell to the left

ABS would make all numbers positive.

You'd then run your working calculation on the ABS value


"Dreamstar_1961" wrote in message
...
not sure on how to do this, got 2 columns first has a dollar value, second
has the formula, the dollar value has both pos and neg value, based on
what
value is in will return a word,
so +/- 1-500=tl +/-501-2000=ss and so on
I came up with this wich works for the pos but has to work for the neg as
well
=if(and(a10,a1<501),"tl",if(and(a1500,a1<2000)," ss","")) and so on, is
there a way that the formula can be put in with out having to go something
like,
=if(and(a10,a1<5001,a1-501,a1<-0),tl,"") and so on
it's to look something like this
a1 $200 b1 tl
a2 $600 b2 ss
a3 -$300 b3 tl
a4 -$1000 b4 tl





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default if statment

not a way the that would have thought of, just had to find a empty column
that I could put it in, but it works, I just put that column it's in to
hidden so it could not be seen,
thanks for the help

"RFJ" wrote:

You could create an additional column next to your dollar column with the
formula =ABS(xx) where xx is the ref of the cell to the left

ABS would make all numbers positive.

You'd then run your working calculation on the ABS value


"Dreamstar_1961" wrote in message
...
not sure on how to do this, got 2 columns first has a dollar value, second
has the formula, the dollar value has both pos and neg value, based on
what
value is in will return a word,
so +/- 1-500=tl +/-501-2000=ss and so on
I came up with this wich works for the pos but has to work for the neg as
well
=if(and(a10,a1<501),"tl",if(and(a1500,a1<2000)," ss","")) and so on, is
there a way that the formula can be put in with out having to go something
like,
=if(and(a10,a1<5001,a1-501,a1<-0),tl,"") and so on
it's to look something like this
a1 $200 b1 tl
a2 $600 b2 ss
a3 -$300 b3 tl
a4 -$1000 b4 tl






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default if statment

While the solution works fine, there's really no need for the extra
column - see my other reply.

In article ,
Dreamstar_1961 wrote:

not a way the that would have thought of, just had to find a empty column
that I could put it in, but it works, I just put that column it's in to
hidden so it could not be seen,
thanks for the help

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default if statment

One way:

B1: =LOOKUP(ABS(A1),{0,"tl";500.01,"ss";2000.01,"somet hing else"})

In article ,
Dreamstar_1961 wrote:

not sure on how to do this, got 2 columns first has a dollar value, second
has the formula, the dollar value has both pos and neg value, based on what
value is in will return a word,
so +/- 1-500=tl +/-501-2000=ss and so on
I came up with this wich works for the pos but has to work for the neg as well
=if(and(a10,a1<501),"tl",if(and(a1500,a1<2000)," ss","")) and so on, is
there a way that the formula can be put in with out having to go something
like,
=if(and(a10,a1<5001,a1-501,a1<-0),tl,"") and so on
it's to look something like this
a1 $200 b1 tl
a2 $600 b2 ss
a3 -$300 b3 tl
a4 -$1000 b4 tl



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 43
Default if statment

this one I like better, as it's smaller formula, and easyer to add to the
work file.
thanks for the help


"JE McGimpsey" wrote:

One way:

B1: =LOOKUP(ABS(A1),{0,"tl";500.01,"ss";2000.01,"somet hing else"})

In article ,
Dreamstar_1961 wrote:

not sure on how to do this, got 2 columns first has a dollar value, second
has the formula, the dollar value has both pos and neg value, based on what
value is in will return a word,
so +/- 1-500=tl +/-501-2000=ss and so on
I came up with this wich works for the pos but has to work for the neg as well
=if(and(a10,a1<501),"tl",if(and(a1500,a1<2000)," ss","")) and so on, is
there a way that the formula can be put in with out having to go something
like,
=if(and(a10,a1<5001,a1-501,a1<-0),tl,"") and so on
it's to look something like this
a1 $200 b1 tl
a2 $600 b2 ss
a3 -$300 b3 tl
a4 -$1000 b4 tl


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
If statment if its possible. atb Excel Discussion (Misc queries) 2 October 17th 06 05:50 PM
SumIF Statment [email protected] Excel Discussion (Misc queries) 1 September 14th 06 06:29 AM
Something is wrong with this IF statment bastien86 Excel Worksheet Functions 2 August 3rd 06 05:39 PM
If statment in Chart restockw Excel Discussion (Misc queries) 0 June 28th 06 04:34 PM
If statment helpdesk genie Excel Worksheet Functions 2 January 12th 05 03:23 AM


All times are GMT +1. The time now is 05:30 PM.

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

About Us

"It's about Microsoft Excel"