Hi Guys
not sure if I can reopen a query, he goes
Jb helped with the info I gave him or did not, now I have added another section in sheet 5
Help JB
Stephen
Hi Guys
not sure if I can reopen a query, he goes
Jb helped with the info I gave him or did not, now I have added another section in sheet 5
Help JB
Stephen
Last edited by stephen1000; 12-17-2008 at 06:34 PM. Reason: added more data
I see some if functions here and there, but without knowing which ones you want to have precedence I can't really put them together for you.
Anytime I need to put together a large group of "if"s, I do them one at a time, a-like-a-so
That way you can test each section while still only changing your initial data, also works if they're dependant upon eachother ( The code would simply refer to the cell above it for it's criteria ). When you want to conglomerate them all, start at the bottom, (I'd recommend making a copy of them while seperated for future use), anyways, start at the bottom, and work your way up, replacing "Next step" with the formula from the line below it, without the = of course ( If the cells are dependant upon eachother, you'd replace any part of the code which had say.. A2, with the formula in A2) . Add one more bracket on the end for each IF you add, and there you have it - An insanely complex if statement which is completely indicipherable. But functional.![]()
Please Login or Register to view this content.
p.s.
I'd REALLY recommend keeping a copy of the broken down versions for future use, saves a lot of trouble if criteria changes.
Last edited by mewingkitty; 12-10-2008 at 06:02 PM. Reason: Cuz I luvz editz!
You can nest 7 if statements together. To go beyond that would require you use a second column to do some followup. 14 IFs would probably take 3 cells.
Are you sure you even need IF? It appears you're looping the same formula over and over looking for a value, and that is what LOOKUP is best suited for.
I added some range markers at the top of sheet5 in green, and changed the formulas on Sheet4 to show how a much shorter LOOKUP gets you the same result (green cells).
Is that cell N14 the one that was giving you problems? It works now.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Please download and review the sheet I posted above. The green cells on sheets 4 & 5 are my edits. I think this is all you need, to stop using IF and use LOOKUP instead.
N7 should read 1
n8 should read 7
N9 should read 7
N10 should read 7
N11 should read 5
N12 should read 5
N13 should read 2
N14 should read 2
pasted yellow sheet 4, sheet 5
thanks
I created a LOOKUP designed to replicate the answers you showed in your first post. Were those answers wrong? You didn't say that...
What value in E2 was generating these answers? 1 7 7 7 5 5 2 2 ?
OK, I realized your cell D5 was critical, too. So I built in a check into the formulas in N7-N14 to watch that cell, too.
When I parse out the value in E2, it's equivalent to column F on Sheet5, right? In that case, based on the choice in D5, the data in green now flows from column F for that value.
I added the missing 2320 chart at the bottom of Sheet5 and it needs your actual part # and values in the chart. (yellow cells) But the sheet4 green cells are watching that part already, so they'll work once you put those values in.
Be sure to EDIT your original post and mark the PREFIX box [SOLVED]
Hi JB help if you can or want too
cheers
stephen
look at the attachment on the first post
cheers
Did you just ask a question I missed? I thought this thread was solved.
Hi JB,
I thought it was, I am adding more data to sheet 5 ie 2020, 2120, 2320 & batten; following what formulas you have added but it wont let me add any more ie Batten.
would appriciate your help
cheers
stephen
How many more? Any chance you can lay that out completely before submitting it for any more help? Add all the sections you want, then post it up again.
Hi Jb
thanks will do.
stephen
Hi JB
attached is the continuing worksheet you have helped so much on
cheers
page 5 has the info
when hardware is choosen "Batten", like the others the relavent info needs to come up
stephen![]()
Here you go.
I made the formulas a little easier to read in the cells, so you can decipher it more readily if you want to add another level. You can go 3 more, then you need a new design since IF only goes 7 deep in Excel 2003.
It was really bugging me bumping up into those IF limitations, so here is your sheet without IF usage, changing over to an Indexed TABLE (name range). To make it work simply, I used an added column on Sheet5 to make a single lookup range from the small table and sub item, you'll see what I mean when you look at column A.
When you expand your tables to include more sections, just make sure those helper cells are included and your Sheet4 Index/Match formulas will just keep plugging along.
Cheers.
Hi JB
Thats awesome man,
now it only shows 2020 upto 2500 anything over that then the next system is used 2120 or 2320
one small problem when batten is selected, N22 should show calculations going down the page, the formulas are their but no results
thanks again for what you have done, when this is implemented the time and cost saving should earn me a pat on the back
cheers
Hey JB
Fixed it, too much vino I think.
I think i will mark this thread Solved
Thanks again
![]()
BL*********dy pc crashed
Anyway
JB you are a star
Off now to watch telly and finish the red off
speak again take care
I noticed you had triggered M22 with a reference that didn't take into account that Batten figures started at 1, and that makes 1-1=0, so the cell stayed blank.
Take care.
Last edited by JBeaucaire; 12-17-2008 at 12:17 AM.
Hi JB,
I was out all day today, looking over what you have done, I have noticed that if the value entered in E2 is less than 1500 N/A appears on page 2 all the way down the list of parts?
I have had a look and cannot figure out why.
any chance you can look at it for me
cheers
ps i see where you are having to *0.001; I have changed vaule's too MM now
this is not the reason for the N/a I started checking this with the 1.75 etc on sheet 5
![]()
Well, built into LOOKUP is the ability to drop down to the next lowest value in a table and still keep working. That's why it was fine in earlier versions.
INDEX/MATCH is an exact science. Sorry, I forgot that. I added in a FLOOR() formula to force the E2 calculation to drop down to the next 250 mark, which is what you've changed your chart to use for breakpoints on Sheet5.
I added in some fun conditional formatting, too, in the bottom right section.
I love Excel.
Hi JB
checking now looks good
cheers mate
Hi JB
I have checked through looks great, seen what you have done with the formating; did on page one sheet 4
thank you for all your help.
will mark as solved later
take care
stephen![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks