Auto-populate P.O. info

TWienholz

Board Regular
Joined
Aug 3, 2016
Messages
61
Hello all. I'm updating our P.O. form again as it has been requested that wave letter representations be placed behind our P.O. number so that anyone looking will know how many waves of collateral materials were ordered just by looking at the P.O. I tried to add on to my original formula which populated the cell with the first project number listed at the top of the form, but when trying to revise it to add the wave letters I got a generic error msg that provided no additional information or help whatsoever.


Original formula: {=IF(SUM(F7:W7),INDEX(F7:W7,MATCH(TRUE,ISNUMBER(F7:W7),0))," ")}
RETURNED: Project #

Revised formula: {=IF(SUM(F7:W8),INDEX(F7:W8,MATCH(TRUE,ISNUMBER(F7:W8),0)), if(OR('Project Data Sheet'!B8="1",'Project Data
Sheet'!B9="English")),"A"),OR('Project Data Sheet'!B8="2",'Project Data Sheet'!B9="English")),"AB"),OR('Project Data
Sheet'!B8="3",'Project Data Sheet'!B9="English")),"ABC")}
RETURNED: ERROR MSG
SHOULD RETURN: Project#A, Project #AB , or Project #AB C, depending on #of waves and the language selected (could also be X, XY, XYZ if Spanish)

I'm sure this is a syntax error on my part, but I can't figure out where it might be. Any help would be greatly appreciated!

Thanks!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi

First point to note is I think F7:W8 should be on just row 7 - F7:W8

=IF(SUM(F7:W7),INDEX(F7:W7,MATCH(TRUE,ISNUMBER(F7:W7),0)), "")&IF('Project Data Sheet'!B9="English", LEFT("ABC",'Project Data Sheet'!B8), "")
 
Upvote 0
Is hard to help without a data sample, but in a quick look i can see an error in your formula.
This doesn't work
MATCH(TRUE,ISNUMBER(F7:W8),0))
The MATCH function works only when the 2nd argument (lookup_array) is a vertical/horizontal one dimensional array.
In your formula F7:W8 is a matrix (two dimensional array)

M.
 
Upvote 0
Hello Marcelo and thank you for the input! But that first MATCH formula worked fine. It populated the first project number in the array with no problem. It's combining that with the IF statement that references the number of waves and the language that I'm having problems with. Does that make sense? Is this even something that can be combined without me having to redo the entire formula?
 
Upvote 0
Thank you so much for responding. I can't get that information you mentioned in one row because of how it is represented on the form itself. It is working fine however by itself, it's just when I am trying to combine it with an IF formula that references the number of waves and the language to give me that WAVE LETTER designation behind the P.O. number. The formula you provided doesn't account for a single wave ("A") or a double wave ("AB"), or take into consideration the reference to the cell that indicates the number of waves needed which is what will tell the formula which WAVE LETTER(S) to use. Does that make sense? The post won't let me send you a screenshot of what I'm talking about so I hope I've described it well enough.
 
Upvote 0
Hi

First point to note is I think F7:W8 should be on just row 7 - F7:W8

=IF(SUM(F7:W7),INDEX(F7:W7,MATCH(TRUE,ISNUMBER(F7:W7),0)), "")&IF('Project Data Sheet'!B9="English", LEFT("ABC",'Project Data Sheet'!B8), "")


Thank you so much for responding. I can't get that information you mentioned in one row because of how it is represented on the form itself. It is working fine however by itself, it's just when I am trying to combine it with an IF formula that references the number of waves and the language to give me that WAVE LETTER designation behind the P.O. number. The formula you provided doesn't account for a single wave ("A") or a double wave ("AB"), or take into consideration the reference to the cell that indicates the number of waves needed which is what will tell the formula which WAVE LETTER(S) to use. Does that make sense? The post won't let me send you a screenshot of what I'm talking about so I hope I've described it well enough.
 
Upvote 0
Is hard to help without a data sample, but in a quick look i can see an error in your formula.
This doesn't work
MATCH(TRUE,ISNUMBER(F7:W8),0))
The MATCH function works only when the 2nd argument (lookup_array) is a vertical/horizontal one dimensional array.
In your formula F7:W8 is a matrix (two dimensional array)

M.

Hello Marcelo and thank you for the input! But that first MATCH formula worked fine. It populated the first project number in the array with no problem. It's combining that with the IF statement that references the number of waves and the language that I'm having problems with. Does that make sense? Is this even something that can be combined without me having to redo the entire formula?
 
Upvote 0
I think you missed the point Marcelo Branco made (I made a typo trying the same)

You have this

=IF(SUM(F7:W8),INDEX(F7:W8,MATCH(TRUE,ISNUMBER(F7:W8),0))

The bits in red won't work, see your first for the difference

{=IF(SUM(F7:W7),INDEX(F7:W7,MATCH(TRUE,ISNUMBER(F7:W7),0))," ")}

And i don't get the second part or your revised formula, I get an error even if I remove the sheet reference. If I untangle the spaghetti I get that

if D8 = 1 then return A
if D8 = 2 then return AB
if D8 = 3 then return ABC

So returning the first [D8] letters in ABC...no??

Really you need to be clear, provide an example of what you have and the result you need.
 
Upvote 0
Hello Marcelo and thank you for the input! But that first MATCH formula worked fine. It populated the first project number in the array with no problem. It's combining that with the IF statement that references the number of waves and the language that I'm having problems with. Does that make sense? Is this even something that can be combined without me having to redo the entire formula?

Yes, the first formula works because the second argument of MATCH, lookup_array, is a one dimensional array (in blue)
=IF(SUM(F7:W7),INDEX(F7:W7,MATCH(TRUE,ISNUMBER(F7:W7),0))," ")

But, in the second formula it's a two dimensional array (in red), so it doesn't work.
=IF(SUM(F7:W8),INDEX(F7:W8,MATCH(TRUE,ISNUMBER(F7:W8),0)), if(OR('Project Data Sheet'!B8="1",'Project Data
Sheet'!B9="English")),"A"),OR('Project Data Sheet'!B8="2",'Project Data Sheet'!B9="English")),"AB"),OR('Project Data
Sheet'!B8="3",'Project Data Sheet'!B9="English")),"ABC")

As i said the MATCH function requires a one dimensional array as its second argument.

M.
 
Upvote 0
I think you missed the point Marcelo Branco made (I made a typo trying the same)

You have this

=IF(SUM(F7:W8),INDEX(F7:W8,MATCH(TRUE,ISNUMBER(F7:W8),0))




The bits in red won't work, see your first for the difference

{=IF(SUM(F7:W7),INDEX(F7:W7,MATCH(TRUE,ISNUMBER(F7:W7),0))," ")}

And i don't get the second part or your revised formula, I get an error even if I remove the sheet reference. If I untangle the spaghetti I get that

if D8 = 1 then return A
if D8 = 2 then return AB
if D8 = 3 then return ABC

So returning the first [D8] letters in ABC...no??

Really you need to be clear, provide an example of what you have and the result you need.

Basically, the format needs to read Project #+# of Wave Letter, i.e. in this instance, 9138000AB since there are 2 waves needed for this order of envelopes. The formula that is pulling that 9138000 number currently is the array formula =IF(SUM(F7:W7),INDEX(F7:W7,MATCH(TRUE,ISNUMBER(F7:W7),0))," ") which references the range of numbers in green.

[TABLE="width: 1141"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col span="2"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD="colspan: 5"]Sample Number(s):[/TD]
[TD="colspan: 3"]9138000 [/TD]
[TD="colspan: 4"]9138001[/TD]
[TD="colspan: 3"]9138002[/TD]
[TD="colspan: 3"]9138003[/TD]
[TD="colspan: 3"]9138004[/TD]
[TD="colspan: 5"]9138005[/TD]
[TD] [/TD]
[TD="colspan: 6"][/TD]
[TD="colspan: 4"][/TD]
[/TR]
[TR]
[TD="colspan: 5"] [/TD]
[TD="colspan: 3"]9138006 [/TD]
[TD="colspan: 4"]9138007[/TD]
[TD="colspan: 3"]9138008[/TD]
[TD="colspan: 3"]9138009[/TD]
[TD="colspan: 3"]9138010[/TD]
[TD="colspan: 5"]9138011[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 5"][/TD]
[TD="colspan: 4"][/TD]
[/TR]
[TR]
[TD="colspan: 5"] [/TD]
[TD="colspan: 22"] [/TD]
[TD="colspan: 6"][/TD]
[TD="colspan: 4"] [/TD]
[/TR]
[TR]
[TD="colspan: 5"]MPL #:[/TD]
[TD="colspan: 7"]101020[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[TD="colspan: 4"] [/TD]
[TD="colspan: 4"] [/TD]
[/TR]
[TR]
[TD="colspan: 5"]Client Name:[/TD]
[TD="colspan: 17"]ABC Company[/TD]
[TD="colspan: 6"] [/TD]
[TD] [/TD]
[TD][/TD]
[TD="colspan: 7"][/TD]
[/TR]
[TR]
[TD="colspan: 5"]Parent Company:[/TD]
[TD="colspan: 17"] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 4"]P.O. Number:[/TD]
[TD]C–[/TD]
[TD="colspan: 3"]9138000[/TD]
[/TR]
[TR]
[TD="colspan: 5"]Project Description:[/TD]
[TD="colspan: 17"][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 4"]Need By Date:[/TD]
[TD="colspan: 4"]7/27/2018[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="colspan: 14"] [/TD]
[TD="colspan: 9"][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 9"]LETTERHEAD[/TD]
[TD="colspan: 10"]#10.5 ENVELOPES[/TD]
[TD="colspan: 11"]6 x 10 ENVELOPES[/TD]
[TD="colspan: 7"]CUSTOM ENVELOPES[/TD]
[/TR]
[TR]
[TD="colspan: 5"]Waves w/Letterhead:[/TD]
[TD="colspan: 4"]2[/TD]
[TD="colspan: 7"]# of Waves:[/TD]
[TD="colspan: 3"]2[/TD]
[TD="colspan: 8"]# of Waves:[/TD]
[TD="colspan: 3"]2[/TD]
[TD="colspan: 3"]# of Waves: 2[/TD]
[TD="colspan: 4"]


[/TD]
[/TR]
</tbody>[/TABLE]

I need to add (I think) an IF formula to that that also incorporates the formula you originally gave me but for English AND Spanish so that one of the following 2 conditions is met:

IF('Project Data Sheet'!B9="English",LEFT("ABC",'Project Data Sheet'!B8)," ") OR
IF('Project Data Sheet'!B9="Spanish",LEFT("XYZ",'Project Data Sheet'!B8)," ")

The formula that you provided is still giving me the project number, but no letter designation.

{=IF(SUM(F7:W7),INDEX(F7:W7,MATCH(TRUE,ISNUMBER(F7:W7),0))," ")&IF('Project Data Sheet'!B9="English",LEFT("ABC",'Project Data Sheet'!B8)," ")}

Does this explain things a bit better?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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