Excel cell auto change or appear data next to it ( or itself)?

2006-12-08 8:18 pm
Hi All,

I want a solution for ms EXCEL, it could be a macro or the function to addin to EXCEL or visual basic or the way how to do it in a simple way.
I use EXCEL for all of my SOLD data, I download the paypal history as a csv file, and use macro to copy and paste info to the WorkSheet within EXCEL, what I want to solve is for example if in cell A1 the text is BBERW621 ( one of my product code) I want the cell next to A1 (A2) will has the information automatically, (the Cost, or the number I did enter somewhere of the solution)

The auto correction of EXCEL don’t work for this problem as the data was Copy and Paste, the auto correction of EXCEL require typing. ( correct me if I am wrong)

I have more than 3 thousands of product (product code)

Thank you for your help and sorry for my poor English.
DSNS

回答 (3)

2006-12-10 3:08 am
✔ 最佳答案
First I believe you meant to add the cost in B1, not A2.

Here's what I suggest -

1. In an Excel workbook, let Sheet 1 be your master list that contains the 3000 product number & cost in column A & B

2. Copy your downloaded data to Sheet 2 - assuming the product number is in A column, then you insert a column in front of B, now enter the following formula in B2 -

=VLOOKUP(A2,Sheet1!A:B,2,0)

3. Copy this formula all the way down, now you should have all the cost in B column

4. You can create a Macro for this process (insert column > type in formula > copy all the way down) so you don't have to repeat the steps every time after the download
2016-05-23 7:16 pm
As someone has said, you can wrap text, or even merge a couple of cells together. To wrap the text, either right button of mouse, format cells, alignment, wrap text or, if you have already typed it, click in the cell, then click in the formula bar where you can see it and where you want the break in lines use Alt Enter to force the words onto next line within same cell. Excel is not really designed for long descriptions and as you yourself say it is 'comments' perhaps you should consider using a comment instead of normal cell (right button of mouse insert comment). The comment is then in a separate box which you can move away from the cell in case it covers other data in other columns, and right button of mouse to show or edit comment. However, as you appear to be using your spreadsheet purely for text, I would advise using a table in Word instead which is more used to text. In that case assuming 2.5 cm margins all the way round and you are working in A4 landscape your first column could be 2 cm wide to accommodate name and the second column 22cm wide to accommodate the comments. You can always cut and paste rather than retying if you want to try this. It would then automatically go into Word as a table and you just need to change the widths. Another advantage of using Word is, as you type in one cell, when it gets to the end margin of that particular cell the text would automatically wrap to the next line.
2006-12-08 8:26 pm
I don't understand your problem very well, but there's a formula called VLOOKUP that's very used full. It goes like this;
eg;
=vlookup(A1,the table,column no,false)

the table should have your product as the first column ans the column no is no of the column in which the needed info is in.

hope it helps


收錄日期: 2021-04-25 19:32:28
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20061208121845AAb1FaO

檢視 Wayback Machine 備份