Help Needed With A Formula Please

angelique7

New Member
Joined
Aug 17, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I hope someone can help me, please.
I am busy working on a spreadsheet and trying to streamline it a bit.
I am trying to reduce the number of columns on the sheet, as it's a rather big spreadsheet, and involves a lot of scrolling from left to right.
I would like to find out if someone can help me with a formula for the following: (I want to include a summary at the bottom of the spreadsheet)

Cell C24 must contain the TOTAL number of km's travelled for "staff" - the formula must check if column C contains "staff" and then deduct the value in column D from column E

I was using a column with a formula to sum whatever info I wanted, but I want to reduce the number of columns in this sheet. I have attached a small sample of the sheet.
I would appreciate any advice or assistance.
Many thanks,
Angelique
 

Attachments

  • Screenshot (562).png
    Screenshot (562).png
    35.7 KB · Views: 8

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi & welcome to MrExcel.
Can you post some sample data, rather than an image.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
06.07.2022.xlsx
I
20
Sheet1


Hi,

This is my first time using XL2BB - Please let me know if I've done so correctly?

Thank you
 
Upvote 0
You need to select the range first, which from the image looks to be C8:F25
 
Upvote 0
06.07.2022.xlsx
BCDEFGHIJ
8OpeningClosing
9MC358520.0058527.00
10Staff58527.0058535.008.00I want to get rid of column F completely
11Staff58535.0058546.0011.00
12Unloaded58546.0058558.00 
13Staff58558.0058570.0012.00
14Staff58570.0058582.0012.00
15MC458582.0058593.00 
16Unloaded58593.0058605.00 
17Staff58605.0058639.0034.00
18Collecting Order from Supplier58639.0058651.00
19Collecting Order from Supplier58651.0058676.00
20
21
22Summary:
23KM's
24Staff77.00Cell C24 would contain the TOTAL number of km's travelled for "staff" - the calculation must search / lookup if column C contains "staff" and then deduct the value in column D from column E
25
26
27
28
Sheet1
Cell Formulas
RangeFormula
F10:F17F10=IF(C10="Staff",E10-D10,"")
D10:D19D10=E9
C24C24=SUM(F10:F19)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C11Cell Valuecontains "No Transport Charged"textNO
C11Cell Valuecontains "Free Delivery"textNO
C19:C21,C23Cell Valuecontains "No Transport Charged"textNO
C19:C21,C23Cell Valuecontains "Free Delivery"textNO
C9:C10,C12:C18Cell Valuecontains "No Transport Charged"textNO
C13Cell Valuecontains "Free Delivery"textNO
C9:C10Cell Valuecontains "Free Delivery"textNO
C12,C14:C18Cell Valuecontains "Free Delivery"textNO
E9:E23Cell ValueduplicatestextNO


Okay - I hope i've done it right this time :)
 
Upvote 0
Thanks for that, how about
Fluff.xlsm
BCDE
8OpeningClosing
9MC35852058527
10Staff5852758535
11Staff5853558546
12Unloaded5854658558
13Staff5855858570
14Staff5857058582
15MC45858258593
16Unloaded5859358605
17Staff5860558639
18Collecting Order from Supplier5863958651
19Collecting Order from Supplier5865158676
20
21
22Summary:
23KM's
24Staff77
25
Original
Cell Formulas
RangeFormula
D10:D19D10=E9
C24C24=SUM(FILTER(E9:E19-D9:D19,C9:C19=B24))
 
Upvote 0
It works perfectly! Thank you SO much, I really appreciate your patient and very quick and efficient help! :)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
For future reference

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Help Needed With Nested Formula
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Okay thank you for letting me know. I should have deleted my post on ExcelForum before I posted here, but I was getting frustrated with the site. Please accept my apologies. I am very sorry.
Going forward, when I need Excel help again, I'd rather post in MREXEL.COM, as I was very happy with the patient help I received today.

Thank you again, and kindest regards,

Angelique
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,335
Members
452,636
Latest member
laura12345

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