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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
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
119050105WOPO
219010101
319020102
419030103
519040104
619050105
719060106
819070107
919080108
1019090109
1119100110
1219110111
1319120112
1419130113
1519140114
1619150115
1719160116
1819170117

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B1=VLOOKUP(A1,$D$2:$E$18,2,FALSE)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

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,214,899
Messages
6,122,155
Members
449,068
Latest member
shiz11713

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