i have one item with purchase and sale rate (Apple : $10 : $12 ). I have two cells A1 and D1. I want to do, if "purchase" in D1 then A1=$10 likewise "sale" in D1 then A1=$12 against item name (Apple).
In cell A1: =If(D1="purchase",10,If(D1="sale",12,"Error"))
This will put the proper amount in cell A1 and display Error if an invalid value is in D1.
Related
Column A: Cost of an apple
Column B: Quantity of apples purchased
Column C: Total cost of apples purchased
Cell A2: $1.50
Cell B2: 3
Cell B3: 10
Cell B4: 15
C2 currently has the formula =A2*B2. How would I tweak the formula, so that when I drag down the formula to cells C3 and C4, A2 stays the same?
To keep a specific cell reference value, use a $ in front of the cell and row reference, so to the formula, that would be: $A$2*B2
If column A is marked with an X, the adjacent cell in column B will find the last populated cell in column B and simply +1 to that.
For example: If A1 is marked and B1 is HF2056, and it skips a row so that A3 is marked with an X, B3 would need to auto fill to be HF2057.Image with fake numbers for example
So how do I formulate it so that if a cell in column A is marked with an X, the adjacent cell in column B will find the last filled cell in B with data and fill in the new number?
I feel like this may be an ISBLANK formula but I can't figure it out.
Thank you in advance!
Assume : A1 is X and B1 is HF2056, A2 is blank, A3 is X
Then, in B2, formula copied down :
=IF(A2="","",LEFT(LOOKUP(1,0/(A$1:A1="X"),B$1:B1),2)&RIGHT(LOOKUP(1,0/(A$1:A1="X"),B$1:B1),4)+1)
And, formula result:
B2 : (blank)
B3 : HF2057
Remark :
The above formula result will give max number in HF10000.
If you want the number keep to increase by 1, the B2 formula will be changed to :
=IF(A2="","",LEFT(LOOKUP(1,0/(A$1:A1="X"),B$1:B1),2)&RIGHT(LOOKUP(1,0/(A$1:A1="X"),B$1:B1),LEN(LOOKUP(1,0/(A$1:A1="X"),B$1:B1))-2)+1)
I'd like to ask how can I use if and else to my calculation in Excel. Here's the case:
A1=usd, B1=php, C1=conversion amount in usd, D1=total amount in usd
Question: The formula will place in cell d1. I want this way, if I put amount into cell a1 it will only lookup the amount and displayed in cell d1 or if I'm going to put amount in cell b1 and c1, cell d1 calculates the conversion of cell b1 and c1 (a1/c1)? Can you provide me formula or code?
Try
=IFERROR(IF(A2<>"",A2,B2/C2),"")
You can modify the conversion as per your wish.
Note: It will calculate conversion only if the A2 cell is blank or else it will display the value of A2.
Let me know if it works.
How Can I Get First Cell Content ?
here is my sheet
A
1 Color
2 Red
3 Blue
4 Yellow
note : Color has filter
i want to make the cell B1 = first cell of column A - I try type in B1 =A2
but when i make filter (example i select blue) the cell B2 show nothing (i want B1 to show the filtered data on first column )
A Non-Volatile AND Non-Array entered option is to use a helper column:
In B2 Enter =SUBTOTAL(3,A2) and drag it down. This will mark every row with a 0 or a 1 depending on if it is visible or not.
Then in B1 you can simply enter:
=INDEX(A2:A4,MATCH(1,B2:B4,0))
The above will search the B column for the first 1 (stands for visible), and return the value of the cell in column A of that row.
In B1 enter the array formula:
=INDEX(A2:A100,MATCH(1,SUBTOTAL(3,OFFSET(A2:A100,ROW(A2:A100)-ROW($A$2),,1)),0))
Array formula must be entered with CNTRL-SHFT-ENTER rather than just the ENTER key
I would like to take date information from cell A1 (e.g. 10/10/2013 09:00) and transfer the month into cell B1 (October) and then based on the month fill in cell C1 the proper quarter (Q4). How can I do this in Excel?
To get the month from A1, simply do, at B1
=(A1)
To get the quarter of A1, based on B1, I like to use this formula on C1:
=INT((B1-1)/3)+1
If you want a column that shows month names, use the following formula (you may have to use , instead of ;:
=TEXT(A1;"mmm")
One problem with this approach is that you can't use this formula on B1, or else the formula on C1 won't work. That is, unless you bypass B1 and have C1 referr directly to A1, like this:
=INT((MONTH(A1)-1)/3)+1