If/Match/Max formula

NileUk

New Member
Joined
Jan 20, 2021
Messages
10
Office Version
  1. 2007
Platform
  1. Windows
Hi guys

Trying to get a formula to work, and failing....again!

So I've got this far and can't understand why its not working, did tests as I went along, but now it's coming up with a result of '0' Dunno why?

The Formula is as follows

Excel Formula:
=IF(AND(MATCH(C5,[Quote '#],0),([Customer Name]=C6)),MAX([Customer '#]),MAX([Customer '#])+1)

I haven't started on the formula for the Job # cells yet but if you could point me in the right direction I would greatly appreciate it.

heres a pic of the spreadsheet.

Kind Regards

Nile


MrExcel-Screenhot#1.jpg
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Best guess would be that you actually need a {=MAX(IF(.....))} formula but that is just a guess at the moment, nothing more.

Try posting your sample with XL2BB (link in my signature below this post) and typing the relevant information into the post (a description of what the formula should do and the results expected based on the example).

Your existing formula makes no sense and your screen capture is illegible due to the resolution. Also, it would be of no use if we need to test formulas on the data as we can not copy it to excel easily.
 
Upvote 0
Best guess would be that you actually need a {=MAX(IF(.....))} formula but that is just a guess at the moment, nothing more.

Try posting your sample with XL2BB (link in my signature below this post) and typing the relevant information into the post (a description of what the formula should do and the results expected based on the example).

Your existing formula makes no sense and your screen capture is illegible due to the resolution. Also, it would be of no use if we need to test formulas on the data as we can not copy it to excel easily.
Hi Jason

thanks for your reply.

I cant install XLB2B as im running XL 2007. Ill try and make the jpeg bigger.
 
Last edited:
Upvote 0
I think that you missed a bit of info in post 4.

I think that you're going to end up with serious circular reference errors trying to do that with formulas. As I said earlier, formulas can't be tested on screen captures. Without a usable sample, I very much doubt that anyone would be willing to attempt this.

On a side note, the info at the bottom of the screen capture suggests that this could be a course assignment, in which case you would possibly have had some instruction on the method that you will be expected to use, any suggestions that we make would likely use significantly different methods.
 
Upvote 0
Hi NileUK,

I see @jasonb75 called it in post #6 as you subsequently made a duplicate post asking to resolve a circular reference (which would return a zero).

I don't think we're seeing the whole story. I can imagine this may be a VBA exercise but I can't see how you can populate the table using just formulae.
 
Upvote 0
Hi guys

Trying to get a formula to work, and failing....again!

So I've got this far and can't understand why its not working, did tests as I went along, but now it's coming up with a result of '0' Dunno why?

The Formula is as follows

Excel Formula:
=IF(AND(MATCH(C5,[Quote '#],0),([Customer Name]=C6)),MAX([Customer '#]),MAX([Customer '#])+1)

I haven't started on the formula for the Job # cells yet but if you could point me in the right direction I would greatly appreciate it.

heres a pic of the spreadsheet.

Kind Regards

Nile

Hi NileUK,

I see @jasonb75 called it in post #6 as you subsequently made a duplicate post asking to resolve a circular reference (which would return a zero).

I don't think we're seeing the whole story. I can imagine this may be a VBA exercise but I can't see how you can populate the table using just formulae.
Hi Fluff

I don't know what you mean by you are not seeing the whole story? I opened a new thread as I was doing something wrong uploading the mini sheet into the orinal thread so opened a new one. I now know what I was doing wrong. Many appologies. Jasonb75 seemed to think this is some sort of course work, but its nothing of the sort I'm trying to get my business accounting sorfware up and running and keep coming up agasinst formula or vba issues that are way above my current coding knowledge.

Help please.xlsx
BCDEFGHIJKLM
4Table1
5Quote #Q10404Quote #Customer #Customer NameJob ## of engineershourly RateTotal HoursJob ValueMaterial Costs
6Customer Meg Ryan Q1039545051Fred Dibner11£ 20.0016£ 360.00£ 40.00
7hourly Rate£ 25.00Q1039645052Peter Jones11£ 25.004£ 186.00£ 86.00
8# of engineers2Q1039745051Fred Dibner22£ 20.0032£ 820.00£ 180.00
9total hrs50Q1039845053Alexi Sale12£ 25.0024£ 860.00£ 260.00
10Material Costs£ 250.00Q1039945051Fred Dibner31£ 20.004£ 95.00£ 15.00
11Job Value£ 1,500.00Q1040045054John Belushi11£ 25.008£ 237.00£ 37.00
12Q1040145055Joan Armatrading12£ 20.0016£ 389.00£ 69.00
13Q10402Fred Dibner£ -
14Q1040345051Fred Dibner41£ 20.0048£ 1,170.00£ 210.00
15Q104040Meg Ryan£ -
16Q1040545056Neil Young12£ 25.0016£ 550.00£ 150.00
17Q1040645057Meg Ryan11£ 25.0016£ 539.00£ 139.00
18Q1040745053Alexi Sale21£ 25.008£ 269.00£ 69.00
19Q1040845057Meg Ryan21£ 25.004£ 145.00£ 45.00
20Q10409John Belushi£ -
21Q1041045051Fred Dibner51£ 20.004£ 110.00£ 30.00
Sheet1
Cell Formulas
RangeFormula
C11C11=C9*C7+C10
F15F15=IF(AND(MATCH(C5,[Quote '#],0),([Customer Name]=C6)),MAX([Customer '#]),MAX([Customer '#])+1)
L6:L21L6=K6*J6+M6
 
Upvote 0
Hi NileUK,

It was I who suggested we're not seeing the whole story because it appears as if you're trying to populate a database from the values you put in C5 to C11 but Functions do not provide persistence across recalculations. If you populate E15 to M15 for Meg Ryan then when you try and populate John Belushi the values in C5 to C11 will also change for Meg Ryan.

You will need a VBA solution which is beyond my skills.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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