ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help with formula (https://www.excelbanter.com/excel-discussion-misc-queries/40629-help-formula.html)

mykaltx

Help with formula
 

I am writing a workbook that can calculate the weights of steel. There
are space issues with the workbook. It will be used in our shop and it
needs to stay simple.

I got some good advise from some folks on here. They told me it was a
bad idea to use merged cells.

I am trying to write a formula for a trapezoid. I am really bad at
using the left and right cell functions. I really want to use these.
The way I got the trapezoid formula was to add columns and cells. If I
can use a formula that uses the right and left formulas I would prefer
this. Here is the formula that I was able to come up with.
=IF(LEFT(G22,3)="TPL",((O22*12+Q22 +
S22*12+U22)/2*(W22*12+Y22))*VLOOKUP(G22,Sheet2!A:B,2,FALSE)/144*D22,((W22*12)+Y22)*(VLOOKUP(G22,Sheet2!A:B,2,F ALSE)/12)*D22)

I have posted the information on my web page for people to look at to
verify what I am talking about. Let me know if you have any questions
or comments. WWW.MYKALTX.COM


--
mykaltx
------------------------------------------------------------------------
mykaltx's Profile: http://www.excelforum.com/member.php...o&userid=22055
View this thread: http://www.excelforum.com/showthread...hreadid=396151


swatsp0p


It seems you have achieved your goal. Your sample looks functional to
me. Is there a question here?

The comments regarding merged cells relate more to functionality when
it comes to copying, sorting and other tasks that are greatly hampered
or prohibited by merged cells. I would think you could accomplish what
you are doing without merging cells, but at this point I don't see it
interfering with what you have.

Good Luck

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=396151


mykaltx


Hey Mr. Bruce,

On the second sheet I am able to calculate a trapezoid by adding cells.

I guess what I am asking is how do I write a formula for calculating a
trap. Without adding the cells. I am not able to do it with the right
and left functions. I am not sure how to code it.
Say for example I want the dimension in cell C15 "x 15" I do not know
how to pick it up for calculation in the trapezoid.

I hope that makes sense.


--
mykaltx
------------------------------------------------------------------------
mykaltx's Profile: http://www.excelforum.com/member.php...o&userid=22055
View this thread: http://www.excelforum.com/showthread...hreadid=396151


swatsp0p


This formula will return the "15" from your <Book3Sheet1!C18:

=RIGHT(C18,LEN(C18)-(FIND("x",C18)+1))

notice the use of FIND. What I did was find the 'x' in your
measurement and added one to count the space after the 'x', and return
whatever is to the right of that. If the same is applied to C15,
"13.75" is returned.

HTH

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=396151


mykaltx


Cool
I am really interested in learning more about coding in excel. I just
do not know where to go to take a class for formulas. There are plenty
of classes for VB.


--
mykaltx
------------------------------------------------------------------------
mykaltx's Profile: http://www.excelforum.com/member.php...o&userid=22055
View this thread: http://www.excelforum.com/showthread...hreadid=396151


swatsp0p


A real good place to start is the built in Function Help system. For
example: Click on InsertFunction. In the box that opens, select Text
from the "Or select a category:" drop down. Scroll in "Select a
function:" to FIND, highlight it and then click on the
_Help_on_this_function_ link.

You will 'find' (no pun intended) a lot of help on what it does and how
it works.

Study that, pick another function and repeat.

Good Luck!

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=396151



All times are GMT +1. The time now is 12:24 AM.

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