ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   i need halp with a formula (https://www.excelbanter.com/excel-discussion-misc-queries/19223-i-need-halp-formula.html)

detlghtpd

i need halp with a formula
 
i am trying to make a formula that says "if text in cell A1 is "apple" then
add number in cell A3 to cell A2"

If Text in cell A1 is Orange then add number in cell A3 to Cell A2

Bob Phillips

That looks like the same action to me.

Where does the result go? If you want it in A2, you need code.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"detlghtpd" wrote in message
...
i am trying to make a formula that says "if text in cell A1 is "apple"

then
add number in cell A3 to cell A2"

If Text in cell A1 is Orange then add number in cell A3 to Cell A2




Dave O

Your post seems to conflict with itself: you've said you want to add a3
+ a2 if a1 is both "apple" and "orange".

Here's a starting point:
=if(a1="apple",a3+a2,"a1 is not apple")

You can substitute another result, perhaps 0, for "a1 is not apple".


detlghtpd

sorry it was not clear i just started trying to learn excel. what i want is
to take a long list of text items in column (A) that consist of only five
differant items but in random order grapes, bannanas, apples, ect. In column
(B) I want to list this weeks price for each. The price changes weekly so in
column (C) I want to list only the five differant fruits. and in column (D) i
want to list this weeks price for each fruit. what i need is a formula that
matches this weeks price (D) to a specific fruit in (C) and then changes the
Price in B to match its fuit listed in (A)

A column B column C column D column
orange orange 1.50 i
want the price
grape grape 2.00 for
each fruit to be
grape apple 3.00
entered in the (B)column
apple bannana .75
orange
bannana
apple
grape


"Dave O" wrote:

Your post seems to conflict with itself: you've said you want to add a3
+ a2 if a1 is both "apple" and "orange".

Here's a starting point:
=if(a1="apple",a3+a2,"a1 is not apple")

You can substitute another result, perhaps 0, for "a1 is not apple".



detlghtpd

A column B column C column D column
orange orange 1.50 grape
grape 2.00 grape
apple 3.00
apple bannana .75
orange
bannana
apple
grape

i want the price for each fruit to be entered in the (B)column



"detlghtpd" wrote:

sorry it was not clear i just started trying to learn excel. what i want is
to take a long list of text items in column (A) that consist of only five
differant items but in random order grapes, bannanas, apples, ect. In column
(B) I want to list this weeks price for each. The price changes weekly so in
column (C) I want to list only the five differant fruits. and in column (D) i
want to list this weeks price for each fruit. what i need is a formula that
matches this weeks price (D) to a specific fruit in (C) and then changes the
Price in B to match its fuit listed in (A)

A column B column C column D column
orange orange 1.50 i
want the price
grape grape 2.00 for
each fruit to be
grape apple 3.00
entered in the (B)column
apple bannana .75
orange
bannana
apple
grape


"Dave O" wrote:

Your post seems to conflict with itself: you've said you want to add a3
+ a2 if a1 is both "apple" and "orange".

Here's a starting point:
=if(a1="apple",a3+a2,"a1 is not apple")

You can substitute another result, perhaps 0, for "a1 is not apple".




All times are GMT +1. The time now is 07:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com