PC Review


Reply
Thread Tools Rate Thread

Create a conditional formula that results in another calculation

 
 
dyrret
Guest
Posts: n/a
 
      31st Aug 2008
I'm just learning to use Excel.

I want to enter data in either column A (litres) OR column B (US gallons).
Column C will convert to imperial gallons.

I would like to create a formula in column C that would result in this logic:

IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no data
in A(n) and there is data in cell "B(n)" then do calculation B(n)*.83

 
Reply With Quote
 
 
 
 
T. Valko
Guest
Posts: n/a
 
      31st Aug 2008
Try this:

=IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,""))

--
Biff
Microsoft Excel MVP


"dyrret" <(E-Mail Removed)> wrote in message
news:37DCC6C6-1D82-46F4-B772-(E-Mail Removed)...
> I'm just learning to use Excel.
>
> I want to enter data in either column A (litres) OR column B (US gallons).
> Column C will convert to imperial gallons.
>
> I would like to create a formula in column C that would result in this
> logic:
>
> IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no data
> in A(n) and there is data in cell "B(n)" then do calculation B(n)*.83
>



 
Reply With Quote
 
dyrret
Guest
Posts: n/a
 
      31st Aug 2008
Thankyou,
Works wonderfully and makes sense when I see it. I was trying to construct
something too complicated....missed the more straight forward answer.
dyrret

"T. Valko" wrote:

> Try this:
>
> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,""))
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "dyrret" <(E-Mail Removed)> wrote in message
> news:37DCC6C6-1D82-46F4-B772-(E-Mail Removed)...
> > I'm just learning to use Excel.
> >
> > I want to enter data in either column A (litres) OR column B (US gallons).
> > Column C will convert to imperial gallons.
> >
> > I would like to create a formula in column C that would result in this
> > logic:
> >
> > IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no data
> > in A(n) and there is data in cell "B(n)" then do calculation B(n)*.83
> >

>
>
>

 
Reply With Quote
 
dyrret
Guest
Posts: n/a
 
      31st Aug 2008
One question re the answer: I understand what is being "said" except the
double quotation marks.

"T. Valko" wrote:

> Try this:
>
> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,""))
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "dyrret" <(E-Mail Removed)> wrote in message
> news:37DCC6C6-1D82-46F4-B772-(E-Mail Removed)...
> > I'm just learning to use Excel.
> >
> > I want to enter data in either column A (litres) OR column B (US gallons).
> > Column C will convert to imperial gallons.
> >
> > I would like to create a formula in column C that would result in this
> > logic:
> >
> > IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no data
> > in A(n) and there is data in cell "B(n)" then do calculation B(n)*.83
> >

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      31st Aug 2008
If *neither* cell contains a number then the formula returns a blank. The ""
is the syntax for "blank". If you'd rather have a 0 returned:

=IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,0))

Or, you could return an informational message like "no value entered":

=IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,"no value entered"))

Using the COUNT function ensures that a number has been entered in one or
the other cells. It prevents errors if someone accidentally enters a text
string or if one of the cells already contains an error. It may not be
necessary but it makes things robust and doesn't add undue complexity to the
formula.


--
Biff
Microsoft Excel MVP


"dyrret" <(E-Mail Removed)> wrote in message
news:B1C459A7-948E-4CF6-B836-(E-Mail Removed)...
> One question re the answer: I understand what is being "said" except the
> double quotation marks.
>
> "T. Valko" wrote:
>
>> Try this:
>>
>> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,""))
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "dyrret" <(E-Mail Removed)> wrote in message
>> news:37DCC6C6-1D82-46F4-B772-(E-Mail Removed)...
>> > I'm just learning to use Excel.
>> >
>> > I want to enter data in either column A (litres) OR column B (US
>> > gallons).
>> > Column C will convert to imperial gallons.
>> >
>> > I would like to create a formula in column C that would result in this
>> > logic:
>> >
>> > IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no
>> > data
>> > in A(n) and there is data in cell "B(n)" then do calculation B(n)*.83
>> >

>>
>>
>>



 
Reply With Quote
 
dyrret
Guest
Posts: n/a
 
      31st Aug 2008
Thanks again.

"T. Valko" wrote:

> If *neither* cell contains a number then the formula returns a blank. The ""
> is the syntax for "blank". If you'd rather have a 0 returned:
>
> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,0))
>
> Or, you could return an informational message like "no value entered":
>
> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,"no value entered"))
>
> Using the COUNT function ensures that a number has been entered in one or
> the other cells. It prevents errors if someone accidentally enters a text
> string or if one of the cells already contains an error. It may not be
> necessary but it makes things robust and doesn't add undue complexity to the
> formula.
>
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "dyrret" <(E-Mail Removed)> wrote in message
> news:B1C459A7-948E-4CF6-B836-(E-Mail Removed)...
> > One question re the answer: I understand what is being "said" except the
> > double quotation marks.
> >
> > "T. Valko" wrote:
> >
> >> Try this:
> >>
> >> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,""))
> >>
> >> --
> >> Biff
> >> Microsoft Excel MVP
> >>
> >>
> >> "dyrret" <(E-Mail Removed)> wrote in message
> >> news:37DCC6C6-1D82-46F4-B772-(E-Mail Removed)...
> >> > I'm just learning to use Excel.
> >> >
> >> > I want to enter data in either column A (litres) OR column B (US
> >> > gallons).
> >> > Column C will convert to imperial gallons.
> >> >
> >> > I would like to create a formula in column C that would result in this
> >> > logic:
> >> >
> >> > IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no
> >> > data
> >> > in A(n) and there is data in cell "B(n)" then do calculation B(n)*.83
> >> >
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
dyrret
Guest
Posts: n/a
 
      31st Aug 2008
Thank you.....seeing examples and getting explanations is helping me learn.

"David Biddulph" wrote:

> That's an empty string, so if you have no data in A or B your result will be
> blank instead of zero or the boolean FALSE.
> --
> David Biddulph
>
> "dyrret" <(E-Mail Removed)> wrote in message
> news:B1C459A7-948E-4CF6-B836-(E-Mail Removed)...
> > One question re the answer: I understand what is being "said" except the
> > double quotation marks.
> >
> > "T. Valko" wrote:
> >
> >> Try this:
> >>
> >> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,""))
> >>
> >> --
> >> Biff
> >> Microsoft Excel MVP
> >>
> >>
> >> "dyrret" <(E-Mail Removed)> wrote in message
> >> news:37DCC6C6-1D82-46F4-B772-(E-Mail Removed)...
> >> > I'm just learning to use Excel.
> >> >
> >> > I want to enter data in either column A (litres) OR column B (US
> >> > gallons).
> >> > Column C will convert to imperial gallons.
> >> >
> >> > I would like to create a formula in column C that would result in this
> >> > logic:
> >> >
> >> > IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no
> >> > data
> >> > in A(n) and there is data in cell "B(n)" then do calculation B(n)*.83
> >> >
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      31st Aug 2008
You're welcome!

--
Biff
Microsoft Excel MVP


"dyrret" <(E-Mail Removed)> wrote in message
news:C1327B6C-E7BE-40A0-9C23-(E-Mail Removed)...
> Thanks again.
>
> "T. Valko" wrote:
>
>> If *neither* cell contains a number then the formula returns a blank. The
>> ""
>> is the syntax for "blank". If you'd rather have a 0 returned:
>>
>> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,0))
>>
>> Or, you could return an informational message like "no value entered":
>>
>> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,"no value entered"))
>>
>> Using the COUNT function ensures that a number has been entered in one or
>> the other cells. It prevents errors if someone accidentally enters a text
>> string or if one of the cells already contains an error. It may not be
>> necessary but it makes things robust and doesn't add undue complexity to
>> the
>> formula.
>>
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "dyrret" <(E-Mail Removed)> wrote in message
>> news:B1C459A7-948E-4CF6-B836-(E-Mail Removed)...
>> > One question re the answer: I understand what is being "said" except
>> > the
>> > double quotation marks.
>> >
>> > "T. Valko" wrote:
>> >
>> >> Try this:
>> >>
>> >> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,""))
>> >>
>> >> --
>> >> Biff
>> >> Microsoft Excel MVP
>> >>
>> >>
>> >> "dyrret" <(E-Mail Removed)> wrote in message
>> >> news:37DCC6C6-1D82-46F4-B772-(E-Mail Removed)...
>> >> > I'm just learning to use Excel.
>> >> >
>> >> > I want to enter data in either column A (litres) OR column B (US
>> >> > gallons).
>> >> > Column C will convert to imperial gallons.
>> >> >
>> >> > I would like to create a formula in column C that would result in
>> >> > this
>> >> > logic:
>> >> >
>> >> > IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no
>> >> > data
>> >> > in A(n) and there is data in cell "B(n)" then do calculation
>> >> > B(n)*.83
>> >> >
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
JC-PS
Guest
Posts: n/a
 
      6th Sep 2008


"T. Valko" wrote:

> You're welcome!
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "dyrret" <(E-Mail Removed)> wrote in message
> news:C1327B6C-E7BE-40A0-9C23-(E-Mail Removed)...
> > Thanks again.
> >
> > "T. Valko" wrote:
> >
> >> If *neither* cell contains a number then the formula returns a blank. The
> >> ""
> >> is the syntax for "blank". If you'd rather have a 0 returned:
> >>
> >> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,0))
> >>
> >> Or, you could return an informational message like "no value entered":
> >>
> >> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,"no value entered"))
> >>
> >> Using the COUNT function ensures that a number has been entered in one or
> >> the other cells. It prevents errors if someone accidentally enters a text
> >> string or if one of the cells already contains an error. It may not be
> >> necessary but it makes things robust and doesn't add undue complexity to
> >> the
> >> formula.
> >>
> >>
> >> --
> >> Biff
> >> Microsoft Excel MVP
> >>
> >>
> >> "dyrret" <(E-Mail Removed)> wrote in message
> >> news:B1C459A7-948E-4CF6-B836-(E-Mail Removed)...
> >> > One question re the answer: I understand what is being "said" except
> >> > the
> >> > double quotation marks.
> >> >
> >> > "T. Valko" wrote:
> >> >
> >> >> Try this:
> >> >>
> >> >> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,""))
> >> >>
> >> >> --
> >> >> Biff
> >> >> Microsoft Excel MVP
> >> >>
> >> >>
> >> >> "dyrret" <(E-Mail Removed)> wrote in message
> >> >> news:37DCC6C6-1D82-46F4-B772-(E-Mail Removed)...
> >> >> > I'm just learning to use Excel.
> >> >> >
> >> >> > I want to enter data in either column A (litres) OR column B (US
> >> >> > gallons).
> >> >> > Column C will convert to imperial gallons.
> >> >> >
> >> >> > I would like to create a formula in column C that would result in
> >> >> > this
> >> >> > logic:
> >> >> >
> >> >> > IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no
> >> >> > data
> >> >> > in A(n) and there is data in cell "B(n)" then do calculation
> >> >> > B(n)*.83
> >> >> >
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
> Hello T. Valko.

I just went through the formula on the discussion of 08-31-08 responding to
dyrret asking:
"I'm just learning to use Excel.
> >> >
> >> > I want to enter data in either column A (litres) OR column B (US
> >> > gallons).
> >> > Column C will convert to imperial gallons.
> >> >
> >> > I would like to create a formula in column C that would result in this
> >> > logic:
> >> >
> >> > IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no
> >> > data
> >> > in A(n) and there is data in cell "B(n)" then do calculation B(n)*.83"


So do I. I'm learning use Excel WorkSheet. But instead of a column as
mentioned before, I need a single cell like
AB shows on decimal equivalent of minutes or hour with minutes, example,

AC -- 15 minutes = mathematical formula would be, 15 x .01666667 = .25--->>>
this decimal equivalent

of 15 min
AC -- 1hour 35minutes (1.35) = 1.583 this results on AB, and minutes on AC.
I tried modified the one suggested here before but failed.

Any help will be significant.
 
Reply With Quote
 
JC-PS
Guest
Posts: n/a
 
      6th Sep 2008


"JC-PS" wrote:

>
>
> "T. Valko" wrote:
>
> > You're welcome!
> >
> > --
> > Biff
> > Microsoft Excel MVP
> >
> >
> > "dyrret" <(E-Mail Removed)> wrote in message
> > news:C1327B6C-E7BE-40A0-9C23-(E-Mail Removed)...
> > > Thanks again.
> > >
> > > "T. Valko" wrote:
> > >
> > >> If *neither* cell contains a number then the formula returns a blank. The
> > >> ""
> > >> is the syntax for "blank". If you'd rather have a 0 returned:
> > >>
> > >> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,0))
> > >>
> > >> Or, you could return an informational message like "no value entered":
> > >>
> > >> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,"no value entered"))
> > >>
> > >> Using the COUNT function ensures that a number has been entered in one or
> > >> the other cells. It prevents errors if someone accidentally enters a text
> > >> string or if one of the cells already contains an error. It may not be
> > >> necessary but it makes things robust and doesn't add undue complexity to
> > >> the
> > >> formula.
> > >>
> > >>
> > >> --
> > >> Biff
> > >> Microsoft Excel MVP
> > >>
> > >>
> > >> "dyrret" <(E-Mail Removed)> wrote in message
> > >> news:B1C459A7-948E-4CF6-B836-(E-Mail Removed)...
> > >> > One question re the answer: I understand what is being "said" except
> > >> > the
> > >> > double quotation marks.
> > >> >
> > >> > "T. Valko" wrote:
> > >> >
> > >> >> Try this:
> > >> >>
> > >> >> =IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,""))
> > >> >>
> > >> >> --
> > >> >> Biff
> > >> >> Microsoft Excel MVP
> > >> >>
> > >> >>
> > >> >> "dyrret" <(E-Mail Removed)> wrote in message
> > >> >> news:37DCC6C6-1D82-46F4-B772-(E-Mail Removed)...
> > >> >> > I'm just learning to use Excel.
> > >> >> >
> > >> >> > I want to enter data in either column A (litres) OR column B (US
> > >> >> > gallons).
> > >> >> > Column C will convert to imperial gallons.
> > >> >> >
> > >> >> > I would like to create a formula in column C that would result in
> > >> >> > this
> > >> >> > logic:
> > >> >> >
> > >> >> > IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no
> > >> >> > data
> > >> >> > in A(n) and there is data in cell "B(n)" then do calculation
> > >> >> > B(n)*.83
> > >> >> >
> > >> >>
> > >> >>
> > >> >>
> > >>
> > >>
> > >>

> >
> >
> > Hello T. Valko.

> I just went through the formula on the discussion of 08-31-08 responding to
> dyrret asking:
> "I'm just learning to use Excel.
> > >> >
> > >> > I want to enter data in either column A (litres) OR column B (US
> > >> > gallons).
> > >> > Column C will convert to imperial gallons.
> > >> >
> > >> > I would like to create a formula in column C that would result in this
> > >> > logic:
> > >> >
> > >> > IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no
> > >> > data
> > >> > in A(n) and there is data in cell "B(n)" then do calculation B(n)*.83"

>
> So do I. I'm learning use Excel WorkSheet. But instead of a column as
> mentioned before, I need a single cell like
> AB shows on decimal equivalent of minutes or hour with minutes, example,
>
> AC -- 15 minutes = mathematical formula would be, 15 x .01666667 = .25--->>>
> this decimal equivalent
>
> of 15 min
> AC -- 1hour 35minutes (1.35) = 1.583 this results on AB, and minutes on AC.
> I tried modified the one suggested here before but failed.
>
> Any help will be significant.


>>>>>>>>Thanks T. Valko, I already found it,
>>>>>>>>=IF(COUNT(AB19),AB19*(AC9),"<<Enter Time").

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula for concatenating text with results from calculation Mgville Microsoft Excel Misc 2 13th Feb 2009 07:44 PM
Calculation results as static data not formula. =?Utf-8?B?dGNpZGF3bg==?= Microsoft Excel Worksheet Functions 4 12th Sep 2007 05:12 PM
Can a conditional formula display it's results on a new row? =?Utf-8?B?bXRzdG9uZTIwMDE=?= Microsoft Excel Programming 1 20th Jun 2006 03:58 AM
Conditional formula results Scott M. Microsoft Excel Discussion 4 9th Jun 2005 06:01 PM
Conditional formatting based upon the results of a formula Demian Valle Microsoft Access Reports 1 8th Sep 2004 02:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:38 AM.