Combining formulas

HomePro

Board Regular
Joined
Aug 3, 2021
Messages
157
Office Version
  1. 2016
Platform
  1. Windows
I am trying to simplify an existing workbook.
I have almost 1000 lines and over 50 headers so reviewing it is an eyesore.

Right now I am creating two columns. the first formula parses the entry from a data cell that looks like:
Single-Family Home (Residential Inspection) ($23.60) | 4 Point Insurance Evaluation ($0.00) | WDO Inspection - FL ONLY - Primo ($50.00)
So if the column header is wdo the cell populates " WDO Inspection - FL ONLY - Primo ($50.00)"
and then the second parses the $ value so the results are 50.00.

Is there anyway I can combine these two formulas into one?
=IFERROR(TRIM(LEFT(SUBSTITUTE(REPLACE($E3,1,SEARCH(G$1,$E3)-1,""),"|",REPT(" ",999)),999)),"")
and
=IFERROR(SUBSTITUTE(REPLACE(G3,1,SEARCH("$",G3),""),")","")+0,"")

If I could get the 50 result and remove 50 columns it would be so much easier.

any ideas?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
It would help to have a sample of your worksheet. For example, to understand what is in G3 and E3?
 
Upvote 0
Do you mean that you don't want to extract the WDO Inspection - FL ONLY - Primo ($50.00) but just the 50.00?
 
Upvote 0
Ok, how about
Excel Formula:
=TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(REPLACE($E3,1,SEARCH(G$1,$E3)-1,""),"$","")," ",REPT(" ",100)),100))*-1
 
Upvote 0
Is this what you want
Fluff.xlsm
EFG
1WDO
2
3Single-Family Home (Residential Inspection) ($23.60) | 4 Point Insurance Evaluation ($0.00) | WDO Inspection - FL ONLY - Primo ($50.00)50
Data
Cell Formulas
RangeFormula
G3G3=TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(REPLACE($E3,1,SEARCH(G$1,$E3)-1,""),"$","")," ",REPT(" ",100)),100))*-1
 
Upvote 0
Yes, exactly. Wonder why id di not work in mine. Will review again.
Thank you
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0
Glad to help & thanks for the feedback.
Fluff, Sorry cant get this to work. The columns changed some since I started but the issue is the same.
Will this help?
Trying to place this formula in column DA thru ee [ but I am only showing you a few to get the idea] and the reference cell is now BU

Appointment_General_Data.xlsx
BUDADBDCDDDEDFDG
1Pricing_Attributes4 PointAdditional PriceAir SamplingAsbestos TestingCondominiumConvenience FeeDiscount Code
2Single-Family Home (Residential Inspection) ($1323.60) | 4 Point Insurance Evaluation ($0.00) | WDO Inspection - FL ONLY - Primo Pest ($0.00) | Wind Mitigation Assessment ($0.00) | Florida Package ($297.00) | Convenience Fee ($56.72)56.72#VALUE!#VALUE!#VALUE!#VALUE!56.72#VALUE!
3Single-Family Home (Phase 3 - Mattamy - New Construction: Final Inspection) ($424.00) | Sewer Line Inspection ($223.00) | Convenience Fee ($22.65)#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!22.65#VALUE!
4WDO Inspection - FL ONLY - Primo Pest ($197.00) | Convenience Fee ($6.90)#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!6.9#VALUE!
5WDO Additional Visit - FL ONLY - Primo Pest ($115.00)#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!
64 Point Insurance Evaluation ($157.00) | Discount Code JWB4PT applied ($-82.00)#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!
74 Point Insurance Evaluation ($157.00) | Discount Code JWB4PT applied ($-82.00)#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!
8Wind Mitigation Assessment ($132.00) | Convenience Fee ($4.62)#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!4.62#VALUE!
9Single-Family Home (Phase 2 - New Construction: Framing & Mechanicals Inspection) ($444.00) | Convenience Fee ($15.54)#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!15.54#VALUE!
10Additional Price for properties 40 to 50 mile away ($10.00) | Single-Family Home (Residential Inspection) ($397.00) | 4 Point Insurance Evaluation ($85.00) | WDO Inspection - FL ONLY - Primo Pest ($157.00) | Wind Mitigation Assessment ($85.00) | Convenience Fee ($25.69)25.6925.69#VALUE!#VALUE!#VALUE!25.69#VALUE!
Sheet1
Cell Formulas
RangeFormula
DA2:DG10DA2=TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(REPLACE($BU2,1,SEARCH(DA$1,$BU2)-1,""),"$","")," ",REPT(" ",100)),100))*-1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

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