Forum Discussion
Excel Recording macro
Guys
Hope all okay
i just found it this community from a friend and I am so glad to reach here
i have prepared a small database with help of macro recording as you can see in 1,2,3 photos.
in items in-depth photo you can see in column C that three times data has been recorded, with different Item rows as it may vary between 1 to 11 items for one single date and DN Number.
I have to questions here as I cannot figure out by my self and appreciate if anyone wishes to help
1-How can I add something to my code after pasting items to merge cells in column A and B based on column C items ( " meaning merge A2: A4 and Merge B2: B4 individually based on rows number in column c while it 3 in this example )
2- while I get DN Number and Date from Maste list sheet just by referencing the cell there in a relative shape hoping to copy down the other. but while my items not one all the times this shift to other cells in master list and return the 0 while B5 in master list empty when it needs to get back the B3 in master list sheet instead of B5 due to three-row items.
the question here is how we can lock the cell and return cells above in the master list sheet.
it might not clear, please see the attached photos.
thanks in advance
Hemn
5 Replies
- mtarlerSilver Contributor
I for one is not following what exactly you want. Can you maybe explain it in terms of what columns you have and what you want. For example in the image (it's also easier if you include the workbook instead of just a picture), you have a typical entry table with some number, date and then multiple items that are being added. That is actually a useful format. So you want to "merge" some of this information? what do you mean by that? you can use a master table like this for entry and then a pivot table to summarize the data in different ways (i.e. based on dates, based on product, etc...).
- hemnrostamCopper Contributor
thanks for your prompt response, I have attached the workbook including macro and one shape has assigned to do this task.
to make things easier i have added notes in each sheet
- mtarlerSilver Contributor
hemnrostam i didn't get a chance to check the macros and see all that going on but based on the format I saw, what if you reverse things a bit and enter the data on the 'main' table and then the 'entry' sheet (which I'm guessing you print or something based on the 'format') uses a lookup. Then you could 'call' up any record by entering that record info in and the rest would get populated.