I have this forumula =-(AD2-AB2)/AB6 and want the cells to be empty unless I enter a number into column AD.
I have this forumula =-(AD2-AB2)/AB6 and want the cells to be empty unless I enter a number into column AD.
Perhaps =IF(AD2="","",-(AD2-AB2)/AB6)
What if I want it to show #DIV/0! until data is entered?
I got it thanks! If in future I want to do this to a different formula how will I do it?
First, did you notice that you are starting that formula with a minus?
=-(AD2-AB2)/AB6
2nd, If you need to test to see if a cell has data (or anything) in it, as azumi showed, you use =if(cell-ref="","",your-formula
This says IF cell-ref shows "empty", return "empty", otherwise use the formula.
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Perfect, Thanks so much!
happy to help and thanks for the feedback
Did you notice the minus sigh at the start? If it supposed to be there, thats great, but I have made that typo before and wondered why my answers were wrong lol
Yes I just did lol Thanks!
Can you just help me with one more formula: =IF(AA2/(1-AI2)=0,"",AA2/(1-AI2)) I want it to show blank as well.
I would just take 1 cell that would cause the error is was not there, and test for that. So maybe...
=IF(AI2)="","",AA2/(1-AI2))
Note also that I used "" and not 0. 0 (zero) is an entry, and your question referred to the cell having (or not having) a number entered into it (as compared to a formula IN that cell, which would mean the cell is not empty)
Basically I am changing the columns from the attached forumula to my other sheet but it is not working how can I convert it?
Thanks for the file, it helped a lot.
Looks like you dont actually have "nothing" in the cell (col D?) you actually have an error message.
I have changed the formula to this
F2=IF(ISNUMBER(D2),D2/(1-E2),"")
It still showing numbers eventhoug column AI are blanks only the first one has data
please see screenshot https://www.screencast.com/t/94kAHPbJe13k
Your formula is using AA, but your screen shot only starts at AF, cant see what is in AA?
AA is the Cost Price
See screenshot https://www.screencast.com/t/6ybJ3wIdj25
OK so of you are not referencing the column with errors according to your sample sheet, I have adjusted my 1st suggestion...
=IF(AA2)="","",AA2/(1-AI2))
What you need to do, is test the cell that could be empty - in this case, per your samples, that would be in col AA
I want it to be if AI is empty then it should be blank ?
Sorry for back and forth.
Basically If AI is empty it would be blank but it would take the AA which is cost and I will just input the percentage and it will populate it in column AJ
Like I said, you need to set the test, for the cell that may be empty. If that is AI, then set the test for that
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks