Calculate square footage

dekas

New Member
Joined
Dec 15, 2004
Messages
15
Office Version
  1. 2013
Platform
  1. Windows
Morning.
I have a column of data with dimensions entered as y' x z' and need to convert them in the next column to square footage. So far no luck with writing or recording a macro.
Hope someone has run into this before.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Try this

Sub sq_ft()
Dim sqft As Range
Set sqft = Application.InputBox _
("Select First column in list to calculate square footage", "Sq. Ft Calc", Type:=8)

Do Until sqft.Offset(0, -2).Value = ""
sqft = sqft.Offset(, -2).Value * sqft.Offset(, -1).Value
Set sqft = sqft.Offset(1)
Loop
End Sub
 
Upvote 0
Here's a non-macro version if the format is consistent y' x z' :

Sheet1

*AB
5' x 6'30 sq ft
14' x 5'70 sq ft
2' x 100'200 sq ft

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
B1=LEFT(A1,FIND("'",A1)-1)*SUBSTITUTE(RIGHT(A1,LEN(A1)-FIND("x ",A1)-1),"'","") & " sq ft"
B2=LEFT(A2,FIND("'",A2)-1)*SUBSTITUTE(RIGHT(A2,LEN(A2)-FIND("x ",A2)-1),"'","") & " sq ft"
B3=LEFT(A3,FIND("'",A3)-1)*SUBSTITUTE(RIGHT(A3,LEN(A3)-FIND("x ",A3)-1),"'","") & " sq ft"

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


dear bro how can i calculate (4 x 9' 0")+(4 x 8' 0") this one by your method
 
Upvote 0
how can i calculate (4 x 9' 0")+(4 x 8' 0")
Until you get another help, try this long formula in B2 (the source is in A2)
Code:
=IFERROR(IFERROR(LEFT(IFERROR(IF(LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")","")>10),LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),SEARCH("+",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))-1),SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")","")),SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")","")),FIND("x",IFERROR(IF(LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")","")>10),LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),SEARCH("+",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))-1),SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")","")),SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")","")))-1),IFERROR(IF(LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")","")>10),LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),SEARCH("+",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))-1),SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")","")),SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")","")))*SUBSTITUTE(TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),FIND("x",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))+1,FIND("+",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),1)-FIND("x",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))-2)),"'",",")*1+IFERROR(LEFT(RIGHT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))-FIND("+",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))),FIND("x",RIGHT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))-FIND("+",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))))-1),RIGHT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))-FIND("+",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))))*SUBSTITUTE(SUBSTITUTE(RIGHT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))-FIND("*",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),"x","*",LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""))-LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2," ",""),"(",""),")",""),"x",""))))),"'",","),"""","")*1,"")

engakadir.png
 
Upvote 0

Forum statistics

Threads
1,222,786
Messages
6,168,229
Members
452,171
Latest member
saeid025

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top