Copy Contents
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Copy Contents
Hi anyone,
In the attached workbook, how could I make the related date from the column “F†of the sheet “OrderedItemsâ€; to get copied to the cell “O10†of the sheet “NewOrder†when I write the request number in cell I9?
Let’s say for example If I write 111/10 in the cell “I9†of the sheet NewOrder, I want the date 12/1/2010 to get copied to the cell “I10â€
Any help on this would be kindly appreciated.
Thanks in advance.
In the attached workbook, how could I make the related date from the column “F†of the sheet “OrderedItemsâ€; to get copied to the cell “O10†of the sheet “NewOrder†when I write the request number in cell I9?
Let’s say for example If I write 111/10 in the cell “I9†of the sheet NewOrder, I want the date 12/1/2010 to get copied to the cell “I10â€
Any help on this would be kindly appreciated.
Thanks in advance.
You do not have the required permissions to view the files attached to this post.
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78542
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Copy Contents
Format the target cell as a date, and enter the following formula in this cell:
=IF(I9="","",VLOOKUP(I9,OrderedItems!E10:F45,2,FALSE))
=IF(I9="","",VLOOKUP(I9,OrderedItems!E10:F45,2,FALSE))
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Copy Contents
Thanks for the help Hans.
How could I make the appropriate content from the column “M†of the sheet “OrderedItems†to get copied to the column “O†of the sheet “NewOrder†as I write the item name in the column “K†of the sheet “NewOrder.
For example when I write the 111/10 in the cell “I9†the formula copies the date 12/1/2010 to the cell “I10â€
Having the above data in appropriate cells; when I write “Chai†in column “K†I want the data row (3bottls ) from column “M†of the sheet “Ordered Items†to get copied into the column “O†of the sheet “NewOrder†that is related to the Order number in cell “I9â€
How could I make the appropriate content from the column “M†of the sheet “OrderedItems†to get copied to the column “O†of the sheet “NewOrder†as I write the item name in the column “K†of the sheet “NewOrder.
For example when I write the 111/10 in the cell “I9†the formula copies the date 12/1/2010 to the cell “I10â€
Having the above data in appropriate cells; when I write “Chai†in column “K†I want the data row (3bottls ) from column “M†of the sheet “Ordered Items†to get copied into the column “O†of the sheet “NewOrder†that is related to the Order number in cell “I9â€
Best Regards,
Adam
Adam
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Copy Contents
This modification solved the question.
=IF(I9="","",VLOOKUP(I9,OrderedItems!E10:M45,9,FALSE))
=IF(I9="","",VLOOKUP(I9,OrderedItems!E10:M45,9,FALSE))
Best Regards,
Adam
Adam
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Copy Contents
Sorry! this modification does not seem to work up.
Lets say for example if the user writes "chang" in the column "K19" with the formula, the column "O19" still shows the amount "3Kit" instead of showing "6Kit".
So how could the above code be changed so that it shows the exact quantity ordered for the product.
Lets say for example if the user writes "chang" in the column "K19" with the formula, the column "O19" still shows the amount "3Kit" instead of showing "6Kit".
So how could the above code be changed so that it shows the exact quantity ordered for the product.
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78542
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Copy Contents
You should use the code to look up an article, not the description.
Activate the OrderedItems sheet.
In cell C10, enter the formula
=G10&"/"&E10
Fill down to C45.
You can hide column C if you like.
Activate the NewOrder sheet.
In cell O18, enter the formula
=VLOOKUP(F18&"/"&$I$9,OrderedItems!$C$10:$N$45,11,FALSE)
Fill down to O35.
Activate the OrderedItems sheet.
In cell C10, enter the formula
=G10&"/"&E10
Fill down to C45.
You can hide column C if you like.
Activate the NewOrder sheet.
In cell O18, enter the formula
=VLOOKUP(F18&"/"&$I$9,OrderedItems!$C$10:$N$45,11,FALSE)
Fill down to O35.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Copy Contents
I would be happy if you could define the above.HansV wrote:You should use the code to look up an article, not the description.
Meanwhile, the original data sheet in my workbook contains some other data in the column "C".
Having this situation; where should I place the formula (=G10&"/"&E10) which you have suggested to be put in column "C" of the sheet "OrderedItems"
Furthermore, the date in the OrdredItems starts from the Row 5 of column A and the serial number in column "B". With this situation the modification of the formula suggested in the first reply of this thread does not seem to work when the serial number is written in cell "I9" of the sheet NewOrder..
Here is how it had been modified;
=IF(I9="","",VLOOKUP(I9,OrderedItems!A5:B45,1,FALSE))
What may be the reason for this?
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78542
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Copy Contents
If you have moved the data to a different location, you will have to adjust the formulas accordingly.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Copy Contents
As with the above suggestion the formula below does not work.HansV wrote:If you have moved the data to a different location, you will have to adjust the formulas accordingly.
=IF(I9="","",VLOOKUP(I9,OrderedItems!A5:B45,1,FALSE))
What may I have done wrong here?
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78542
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Copy Contents
You cannot use VLOOKUP to look up a value to the left. You can use a combination of INDEX and MATCH instead.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Copy Contents
Because, as said in the in the post Post 32600 the date is in column "A" of the sheet "OrderedItems".
So, in the hope to make the formula workout I did try changing the column number (the next-to-last argument) to 1.
But it failed.
So, in the hope to make the formula workout I did try changing the column number (the next-to-last argument) to 1.
But it failed.
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78542
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Copy Contents
Thanks for the suggestion Hans.
As per your suggestion the following formula has been created.
INDEX(OrderedItems!$A$5:$A$17,MATCH(I9,OrderedItems!$B$5:$B$17,0)) And the formula works fine.
But the modification of the formula as follows
=VLOOKUP(F18&"/"&$I$9,OrderedItems!$A$5:$I$17,8,FALSE) does not seem to work when its placed in the NewOrder Sheet.
I've placed the formula =C5&"/"&B5 in column "I" of the sheet OrderedItems.
What may be missing in here?
As per your suggestion the following formula has been created.
INDEX(OrderedItems!$A$5:$A$17,MATCH(I9,OrderedItems!$B$5:$B$17,0)) And the formula works fine.
But the modification of the formula as follows
=VLOOKUP(F18&"/"&$I$9,OrderedItems!$A$5:$I$17,8,FALSE) does not seem to work when its placed in the NewOrder Sheet.
I've placed the formula =C5&"/"&B5 in column "I" of the sheet OrderedItems.
What may be missing in here?
Best Regards,
Adam
Adam
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Copy Contents
Is this because the serial number format that I'm having is in the format 0001 instead of 111/10
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78542
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Copy Contents
Although an hour and a half have passed, VLOOKUP still can't lookup to the left.
You'll have to use a combination of INDEX and MATCH here too.
You'll have to use a combination of INDEX and MATCH here too.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Copy Contents
I have tried the following by placing it in row 18 and onwards, but without success....
=INDEX(OrderedItems!$H$5:$H$17,MATCH(I9,OrderedItems!$B$5:$B$17,1))
Any help is much appreciated.
=INDEX(OrderedItems!$H$5:$H$17,MATCH(I9,OrderedItems!$B$5:$B$17,1))
Any help is much appreciated.
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78542
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Copy Contents
You have to use concatenation as in =VLOOKUP(F18&"/"&$I$9,OrderedItems!$C$10:$N$45,11,FALSE) but now with INDEX and MATCH.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07