Need some help

Hofver

New Member
Joined
May 29, 2019
Messages
5
Hi!

I need help with my excel worksheet.

If I write XXXX in column A - YYYY will appear in column b.
Is that possible?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
put =if(A1="XXXX","YYYY","") in B1 and copy down
 
Last edited:
Upvote 0
put =if(A1="XXXX","YYYY","") in B1 and copy down


Hmm, sorry that won't work.

We have 17 workorder number which is connected to 17 PO numbers.

(WO 1901 - PO 0101
1902 - 0102
1903 - 0103 etc etc)

So if I write WO number "1901" in column A - PO Number "0101" will be written in column b. Would save alot of time!
 
Upvote 0
ok, try vlookup() with a table like this


Book1
ABCDE
119050105WOPO
219010101
319020102
419030103
519040104
619050105
719060106
819070107
919080108
1019090109
1119100110
1219110111
1319120112
1419130113
1519140114
1619150115
1719160116
1819170117
Sheet1
Cell Formulas
RangeFormula
B1=VLOOKUP(A1,$D$2:$E$18,2,FALSE)
 
Upvote 0
or just ="01"&RIGHT(A1,2) in B1 might work
 
Upvote 0
ok, try vlookup() with a table like this

ABCDE
WOPO

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]1905[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=E2EFDA]#E2EFDA[/URL] , align: right"]0105[/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1901[/TD]
[TD="align: right"]0101[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1902[/TD]
[TD="align: right"]0102[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1903[/TD]
[TD="align: right"]0103[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1904[/TD]
[TD="align: right"]0104[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1905[/TD]
[TD="align: right"]0105[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1906[/TD]
[TD="align: right"]0106[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1907[/TD]
[TD="align: right"]0107[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1908[/TD]
[TD="align: right"]0108[/TD]

[TD="align: center"]10[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1909[/TD]
[TD="align: right"]0109[/TD]

[TD="align: center"]11[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1910[/TD]
[TD="align: right"]0110[/TD]

[TD="align: center"]12[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1911[/TD]
[TD="align: right"]0111[/TD]

[TD="align: center"]13[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1912[/TD]
[TD="align: right"]0112[/TD]

[TD="align: center"]14[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1913[/TD]
[TD="align: right"]0113[/TD]

[TD="align: center"]15[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1914[/TD]
[TD="align: right"]0114[/TD]

[TD="align: center"]16[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1915[/TD]
[TD="align: right"]0115[/TD]

[TD="align: center"]17[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1916[/TD]
[TD="align: right"]0116[/TD]

[TD="align: center"]18[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]1917[/TD]
[TD="align: right"]0117[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B1[/TH]
[TD="align: left"]=VLOOKUP(A1,$D$2:$E$18,2,FALSE)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Thank you, this did the work.
Is it possible to extend the script to lookup from another sheet? Im creating new WO with unique number that is also connected to PO numbers.

Example: WO: 19301 - 0107
19409 - 0117
 
Upvote 0
Couldn't delete my previous post, but here's an better explanation. I hope :biggrin:
nP1yEi4
 
Upvote 0
in that case, its better to define the table as range then it can be put anywhere in the wookbook.

table now defined as =Sheet4!$A$1:$B$18


Book1
AB
119050105
219170117
Sheet1
Cell Formulas
RangeFormula
B1=VLOOKUP(A1,Table,2,FALSE)
Named Ranges
NameRefers ToCells
Table=Sheet4!$A$1:$B$18



Book1
AB
1WOPO
219010101
319020102
419030103
519040104
619050105
719060106
819070107
919080108
1019090109
1119100110
1219110111
1319120112
1419130113
1519140114
1619150115
1719160116
1819170117
Sheet4
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,169
Members
453,021
Latest member
Justyna P

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