Videos are great, if and only if your objective is copy/paste absolute reference. What if I need relative reference, such as copy cell contents and paste right 1 cell and down 2 cells?
Hi, I’m russian and I speak English quite bad, but I hope you understand me. Could you help me with an one problem in my case with Excel. Every day one cell value(C1) changes(It’s a formula), and I want to save every previous cell values during 30 days, and after, when all cell values 30 days are full, I want to delete the oldest cell values if start new day(and get new cell value) etc.. For example: the day before yesterday cell value is A1, Yesterday cell value is B1, now cell value is C1 Tomorrow: A1=B1(which was yesterday), B1=C1(which was yesterday), C1=tomorrow(or now).
This very help full and thanks for sharing these videos. I want to know how to create the macro to copy data from a source (which changes every month) and paste to a different workbook(existing file). Please Help on this. Thx
Hi Bhagya, I'm not sure I fully understand your question. You can use the code that references the workbook name to copy/paste between workbooks. You would just need to change the reference to the workbook name that is changing every month. You could also write some code that loops through all the files in a folder and uses the one with the most recent modified date. You would use variables to reference the workbook name. Checkout my free training series on Macros & VBA for more info on using variables. www.excelcampus.com/vba-training-my-first-macro/
How would I go about which destination cell my values get pasted into? IE.) Cell A2 in my original sheet needs to be in Cell D2 on my destination sheet
Hi Jon, how would you "set the value" of a cell that is currently selected? Example, if I select cell A2, when I use the macro, it will paste the value of cell E2 in cell A2. If I select A4, it will paste the value of cell E2 in cell A4. Thank you
Dear Jon, thank you for this video. I have tried it and it works perfecty, but the only problem i have is that i can not paste textboxes or slectionboxes from one cell to another. Do you have a special code for that? Thank you in advance!
Thank you Yakup! Yes, the code will be different depending on what type of control it is. I don't have any videos for that yet, but will add one in the future.
is it possible to copy paste while excel file is closed? I noticed that copy paste from Workbooks works only if second file is open. That means we need open excel and close it probably.
Hi I want to use the 3rd code that you are presenting, but the cells to be copied are in formulas. I want them pasted in values onto the new workbook. Can you help me ?
hi.. can you help me regarding one VBA, i want to find some figure in column B of a sheet2 that is in a cell a1 of sheet2. if some figures matches than i need that whole row to be selected and copy and paste special command to be run on the selected row is it possible?
Can a similar approach be used copy paste multiple ranges at once from one workbook to another? For example Book1, Range A2, D4, E1, N32, M14 to Book 2, Range A23, B23, D23, H23, K23.
+Ashley Doll Great question Ashley! Unfortunately there aren't any really easy ways to do that in VBA. It works similar to copy/paste in Excel. If you were to do this manually you would have to copy/paste each cell individually. You can't copy and paste multiple non-contiguous cells in Excel manually. The same basic principle goes in VBA. Depending on the setup for your copy/paste you can use a Loop to loop through the cells/ranges for both the copy range and paste range. You could also use the Offset property within that loop if you just wanted to copy the values to the next column over. I also have a feature in my Paste Buddy add-in called Paste Visible that helps with this if you are doing copy/paste on a filtered range. That feature only works within the same workbook right now. Here is a video on it. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-mrDhkClPXEM.html I hope that helps. I wish I had a better answer for you but it's not a straightforward task in VBA either. Let me know if you have any questions. Thanks!
How do you use a reference to navigate where the Macro pastes the array? In other words, if a cell references a pre-set range, how can you reference the name in that cell to paste in the specific range?
Please help me! I tried the exact code to copy paste in the same sheet, but the original data goes missing and there's no paste! First it worked correctly, I pressed some button, debug , save , don't save, cancel 😭 it's not working
Thanks for the video, may i ask something, the mentioned code works fine as long as the source cell is filled manually, however if the source cell is being filled by any equation it just doesn't work, is there any solution to fix this?
+Mahmoud Ibrahim Hi Mahmoud. The code should still work if the source cell contains a formula. The result cell will contain the value (result) of the formula. If you want to copy/paste the actual formula, then you will need to use the Copy method to do that. I hope that helps. Thanks!
How do you comment out a line? It looks like you can use a ' But every time I attempt to comment it out with a ' it doesn't seem to work and just tries to keep writing code...
I'm trying to do this (example): IF Sheet1:A1 (drop down menu) value EQUAL TO Sheet2:G5 (drop down menu options) THEN PASTE Sheet3: F8 TO Sheet4:A1. Can anyone help me out. It is to create a specification writer where someone fills the form, and it brings in clauses and drops them into sheet4 creating the end user document that the client will see.
Ok so now how do you make it write to the next empty row in sheet2? This works fine but as soon as you input new values the destination is overwritten. amy help or am i asking a question on a video that is too old.