Need help with formula

Gubbelille

New Member
Joined
Oct 3, 2021
Messages
8
Office Version
  1. 2019
Platform
  1. Windows
Hi yall!
Im a beginner in this and cant get it to work properly.

So lets say in a1 i have a certain specific text that tells a tool number, in b1 i have 1 of 4 places it will be. In c1 i want to give it the right program based on these values. I can get it right with one but as we have 9 different tools designated to 4 different spots, it all depends on toolname and toolspot that give the number.

Something in the style like if(and(a1="tool1",b1="spot1";"50")
And can u add more after that, that will change spot from 1,2,3,4 and tool1,2,3 and so on and give different value in the end?

Hope this describes it right as english is my second längtade!
 

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.
I would help if you could post sample data and results you want using XL2BB.
 
Upvote 0
Sure, i can show it tomorow as I dont have it available right now.
 
Upvote 0
123123.xlsx
ABCDEFGHIJKLMNOPQRSTU
1
2
3ToolProgramPlace
4Tool 1FH-049ToolProgramPlaceToolProgramPlaceToolProgramPlaceToolProgramPlace
5Tool 154FH-049Tool 153FH-050Tool 144FH-052Tool 146FH-051
6Tool 254FH-049Tool 253FH-050Tool 244FH-052Tool 246FH-051
7Tool 354FH-049Tool 353FH-050Tool 344FH-052Tool 346FH-051
8Tool 454FH-049Tool 453FH-050Tool 444FH-052Tool 446FH-051
9Tool 562FH-049Tool 549FH-050Tool 565FH-052Tool 561FH-051
10Tool 662FH-049Tool 649FH-050Tool 665FH-052Tool 661FH-051
11Tool 762FH-049Tool 749FH-050Tool 765FH-052Tool 761FH-051
12Tool 858FH-049Tool 860FH-050Tool 864FH-052Tool 857FH-051
13Tool 956FH-049Tool 963FH-050Tool 964FH-052Tool 955FH-051
14
15
16
Blad1
 
Upvote 0
123123.xlsx
ABCDEFGHIJKLMNOPQRSTU
1
2
3ToolProgramPlace
4Tool 1FH-049ToolProgramPlaceToolProgramPlaceToolProgramPlaceToolProgramPlace
5Tool 154FH-049Tool 153FH-050Tool 144FH-052Tool 146FH-051
6Tool 254FH-049Tool 253FH-050Tool 244FH-052Tool 246FH-051
7Tool 354FH-049Tool 353FH-050Tool 344FH-052Tool 346FH-051
8Tool 454FH-049Tool 453FH-050Tool 444FH-052Tool 446FH-051
9Tool 562FH-049Tool 549FH-050Tool 565FH-052Tool 561FH-051
10Tool 662FH-049Tool 649FH-050Tool 665FH-052Tool 661FH-051
11Tool 762FH-049Tool 749FH-050Tool 765FH-052Tool 761FH-051
12Tool 858FH-049Tool 860FH-050Tool 864FH-052Tool 857FH-051
13Tool 956FH-049Tool 963FH-050Tool 964FH-052Tool 955FH-051
14
15
16
Blad1
So basically i want what it says in tool and place determine what program it will be in C, is there any possible way to do this? Ive tried with if, and formula but somehow i just cant get it right. If i only do if it will be to long as it can only handle 64 as far as i could tell.

So lets say in A4=Tool 1 and D4=FH-049 then C4 returns the program 54. If A4=Tool 1 and D4=FH-050 then C4 will show 53 and so on.
 
Upvote 0
Maybe:

Book2
ABCDEFGHIJKLMNOPQRST
1
2
3ToolProgramPlace
4Tool 154FH-049ToolProgramPlaceToolProgramPlaceToolProgramPlaceToolProgramPlace
5Tool 154FH-049Tool 153FH-050Tool 144FH-052Tool 146FH-051
6Tool 254FH-049Tool 253FH-050Tool 244FH-052Tool 246FH-051
7Tool 354FH-049Tool 353FH-050Tool 344FH-052Tool 346FH-051
8Tool 454FH-049Tool 453FH-050Tool 444FH-052Tool 446FH-051
9Tool 562FH-049Tool 549FH-050Tool 565FH-052Tool 561FH-051
10Tool 662FH-049Tool 649FH-050Tool 665FH-052Tool 661FH-051
11Tool 762FH-049Tool 749FH-050Tool 765FH-052Tool 761FH-051
12Tool 858FH-049Tool 860FH-050Tool 864FH-052Tool 857FH-051
13Tool 956FH-049Tool 963FH-050Tool 964FH-052Tool 955FH-051
Sheet2
Cell Formulas
RangeFormula
C4C4=INDEX($F$5:$T$13,MATCH($B$4,$F$5:$F$13,0),MATCH($D$4,$F$5:$T$5,0)-1)
 
Upvote 0
Can one assume that the Tools are sorted ascending and Places are always the same in the respective columns? If not, I don't think the nice solution from AhoyNC will work.

Book1
FGHIJKLMNOPQRST
4ToolProgramPlaceToolProgramPlaceToolProgramPlaceToolProgramPlace
5Tool 154FH-049Tool 153FH-050Tool 144FH-052Tool 146FH-051
6Tool 2254FH-049Tool 2253FH-050Tool 2244FH-052Tool 2246FH-051
7Tool 354FH-049Tool 353FH-050Tool 344FH-052Tool 346FH-051
8Tool 254FH-049Tool 253FH-048Tool 244FH-052Tool 246FH-050
9Tool 562FH-049Tool 549FH-050Tool 565FH-052Tool 561FH-051
10Tool 662FH-049Tool 649FH-050Tool 665FH-052Tool 661FH-051
11Tool 762FH-049Tool 749FH-050Tool 765FH-052Tool 761FH-051
12Tool 858FH-049Tool 860FH-050Tool 864FH-052Tool 857FH-051
13Tool 956FH-049Tool 963FH-050Tool 964FH-052Tool 955FH-061
Sheet4
 
Upvote 0
Can one assume that the Tools are sorted ascending and Places are always the same in the respective columns? If not, I don't think the nice solution from AhoyNC will work.

Book1
FGHIJKLMNOPQRST
4ToolProgramPlaceToolProgramPlaceToolProgramPlaceToolProgramPlace
5Tool 154FH-049Tool 153FH-050Tool 144FH-052Tool 146FH-051
6Tool 2254FH-049Tool 2253FH-050Tool 2244FH-052Tool 2246FH-051
7Tool 354FH-049Tool 353FH-050Tool 344FH-052Tool 346FH-051
8Tool 254FH-049Tool 253FH-048Tool 244FH-052Tool 246FH-050
9Tool 562FH-049Tool 549FH-050Tool 565FH-052Tool 561FH-051
10Tool 662FH-049Tool 649FH-050Tool 665FH-052Tool 661FH-051
11Tool 762FH-049Tool 749FH-050Tool 765FH-052Tool 761FH-051
12Tool 858FH-049Tool 860FH-050Tool 864FH-052Tool 857FH-051
13Tool 956FH-049Tool 963FH-050Tool 964FH-052Tool 955FH-061
Sheet4
Well the list will be the same, the table will have different tools on different places.
 
Upvote 0
The problem is all is good in the green field, untill i change the name from STD to LTH o get FALSE. Is it not possible to do this or am i missing something?

=IF(ISNUMBER(SEARCH("526 LHD STD",A5)),IF(C5="FH-049","54",IF(ISNUMBER(SEARCH("526 LHD STD",A5)),IF(C5="FH-050","53",IF(ISNUMBER(SEARCH("526 LHD STD",A5)),IF(C5="FH-052","44",IF(ISNUMBER(SEARCH("526 LHD STD",A5)),IF(C5="FH-051","46",IF(ISNUMBER(SEARCH("526 LHD LTH",A5)),IF(C5="FH-049","62"))))))))))
 
Upvote 0
This doesn't require the list to be sorted, or in the same order, but it does assume that the program is numeric:

Book2
ABCDEFGHIJKLMNOPQRST
1
2
3ToolProgramPlace
4Tool 154FH-049ToolProgramPlaceToolProgramPlaceToolProgramPlaceToolProgramPlace
5Tool 154FH-049Tool 153FH-050Tool 144FH-052Tool 146FH-051
6Tool 254FH-049Tool 253FH-050Tool 244FH-052Tool 246FH-051
7Tool 354FH-049Tool 353FH-050Tool 344FH-052Tool 346FH-051
8Tool 454FH-049Tool 453FH-050Tool 444FH-052Tool 446FH-051
9Tool 562FH-049Tool 549FH-050Tool 565FH-052Tool 561FH-051
10Tool 662FH-049Tool 649FH-050Tool 665FH-052Tool 661FH-051
11Tool 762FH-049Tool 749FH-050Tool 765FH-052Tool 761FH-051
12Tool 858FH-049Tool 860FH-050Tool 864FH-052Tool 857FH-051
13Tool 956FH-049Tool 963FH-050Tool 964FH-052Tool 955FH-051
Sheet2
Cell Formulas
RangeFormula
C4C4=SUMIFS(G5:S13,F5:R13,B4,H5:T13,D4)
 
Upvote 0
Solution

Forum statistics

Threads
1,215,278
Messages
6,124,023
Members
449,139
Latest member
sramesh1024

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