Copy/paste values if the cell next to it is empty every month

Mortenhoey

New Member
Joined
Apr 12, 2021
Messages
32
Office Version
  1. 365
Platform
  1. Windows
Is there a way i can copy paste specific rows to the excel ark. The things i need:

- copy paste e3, e4, e9, e13 and e15 from mappe2 (book) to mappe 1 (book)
- has to copy the value in the given row if the cell next to it is empty
- the macro has to be applied from mappe1 (book)
- next month the may values (which is coming, later at the month) and run it again so it is the may values which copies to mappe1 (book)
- The workbooks has to be open

So the point is to always copy paste the lastest value from mappe2 (book) to mappe 1 - month by month.

In mappe1 there are maybe more variables to come to maybe in two months there has to e3,e4,e9,e13,e15 and add e5 and e14.

So if I can put more rows in the macro for future months copy paste it would be perfect.

I really can figure out to make the macro for choosing a value if the next cell is empty and the same when pasting it in mappe1 (book)

Link to: Photo

Thank you for the help.
 
I cant make it work.. When I choose the rows it says "invalid section" and there is nothing i can do to make i work.
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You need to choose cells from column A, as the input box says.
Read the instructions carefully.
 
Upvote 0
I tried from Column a. Is there a way i can send you the real workbooks then it would make more sense.
Because the one i linked too is just an example.
 
Upvote 0
You could use DropBox or https://easyupload.io/
I’m afraid I didn’t fully understand your needs from your explanation by words.
Maybe you can post images or something and give a concrete example of what you need.
I guess this can be done without having to share your original workbook.
 
Upvote 0
I need a macro to look up a given row:

- The macro should be run in the workbook: photo 1
- All my data is in the workbook in photo 2 (maybe more workbooks to come where I need data from)
- In photo 3 is all the data I need for the given month. The cell number in photo 3 is from february and now i need the data from march (location of the given data in the workbook in photo 2).
- Then i fx need to look up a given row, lets say xDSL @ 50 Mbps in row 145 then i need to copy the value in CL145 and past it into the workbook in photo 1 in the right cell.

Therefore i thought it was easier just to make a macro which lets me choose the workbook I want to copy from and which row and paste it in a workbook where i define which row it has to be in.

Photos is attached
 

Attachments

  • 1 - Destinationworkbook.PNG
    1 - Destinationworkbook.PNG
    85.5 KB · Views: 12
  • 2 - Location workbook.PNG
    2 - Location workbook.PNG
    108.4 KB · Views: 10
  • 3 - Row in need data from.PNG
    3 - Row in need data from.PNG
    72 KB · Views: 11
Upvote 0
Hey, I really don’t like your cross-posting.
Your post in #25 is even worse because you’ve posted exactly the same comment in the first link above.
Did you really read Fluff’s post in #3?
What are you going to do if someone on the other threads give you a solution while I’m working on this matter here?
Will my efforts just be a waste of time?
 
Last edited:
Upvote 0
Hey, I really don’t like your cross-posting.
Your post in #25 is even worse because you’ve posted exactly the same comment in the first link above.
Did you really read Fluff’s post in #3?
What are you going to do if someone on the other threads give you a solution while I’m working on this matter here?
Will my efforts just be a waste of time?

I just thought there was no problem if like Fluffs said there was no problem in cross-posting if they knew it. The conversation with Zot is like 2-3 weeks old and we haven't found a solution so i thought I might try again, too see if other could find a solution for me.

My bad, I understand if you dont want to work on it anymore. But I just really need to find a solution and I have searched for it in a month.
 
Upvote 0
And I closed the conversation on Ozgrid yesterday because i really like this forum.
 
Upvote 0
I just thought there was no problem if like Fluffs said there was no problem in cross-posting if they knew it. The conversation with Zot is like 2-3 weeks old
You never let me know you have a thread on this forum for exactly the same matter, and Zot’s latest comment is only hours old.
I’m not talking about the forum rules, I’m just sad that you’re treating us like free code-writing machines.
I wish you could think carefully about what I mean by this:
What are you going to do if someone on the other threads gives you a solution while I’m working on this matter here?
Will my efforts just be a waste of time?

FYI, what Zot says on the other thread is everything:
Don't really understand what you were trying to say here. I have no idea how to determine which cell to copy to which destination cell. Perhaps you can give captures of source data and also destination data and explain how you decide which data to transfer if possible to do it automatically.
Basically he/she has asked you exactly the same thing as I asked you above.
We don’t have enough information on your needs , which is why you’re having a hard time finding a solution for this.
The images 1 and 3 you posted in #25 may look alike at first glance but they don’t really.
(Presumably) Zot and I still have no idea on:
lets say xDSL @ 50 Mbps in row 145 then i need to copy the value in CL145 and past it into the workbook in photo 1 in the right cell
As I asked, WHERE is the value in CL145 supposed to go? (“the right cell”, this is what you really should make clear.)
Your 3rd image doesn’t have room for it.
And you’ve never said you need the cell addresses from which you’ve retrieved data.
Also, why does it have to be that the value to be retrieved is the one in CL145 while CJ145 and CK145 are empty?
In other words, how do you decide the data to pick up?
Moreover, image 1 has a row that has “xDSL @ 50 Mbps” but image 3 doesn’t.
We obviously can’t figure out how the destination cell is decided from this.
Even more, you never told us that the criteria for copypaste are the values in column G.
At this rate, no code will work because columns need to be specified in any given code.

I’m pretty sure no one will be able to help you out before you learn how to be polite and make the points above clear.
 
Upvote 0
You never let me know you have a thread on this forum for exactly the same matter, and Zot’s latest comment is only hours old.
I’m not talking about the forum rules, I’m just sad that you’re treating us like free code-writing machines.
I wish you could think carefully about what I mean by this:


FYI, what Zot says on the other thread is everything:

Basically he/she has asked you exactly the same thing as I asked you above.
We don’t have enough information on your needs , which is why you’re having a hard time finding a solution for this.
The images 1 and 3 you posted in #25 may look alike at first glance but they don’t really.
(Presumably) Zot and I still have no idea on:

As I asked, WHERE is the value in CL145 supposed to go? (“the right cell”, this is what you really should make clear.)
Your 3rd image doesn’t have room for it.
And you’ve never said you need the cell addresses from which you’ve retrieved data.
Also, why does it have to be that the value to be retrieved is the one in CL145 while CJ145 and CK145 are empty?
In other words, how do you decide the data to pick up?
Moreover, image 1 has a row that has “xDSL @ 50 Mbps” but image 3 doesn’t.
We obviously can’t figure out how the destination cell is decided from this.
Even more, you never told us that the criteria for copypaste are the values in column G.
At this rate, no code will work because columns need to be specified in any given code.

I’m pretty sure no one will be able to help you out before you learn how to be polite and make the points above clear.


I didn't want to post these pictures because it was classified information, so i had to manipulate two worksbooks which should do the same. The rows in photo 3 match the location in photo 2 and I need those location to be copied into photo 1.

Sorry cant says it better. I dont know how to say it better.. (again my english ins't that good).

So fx:
Row 155 (photo 2) the last value in the row (CL155) need to be copy pasted into photo 1 b2. One is done. Then I need to do it for the rest. So if it possible to make a macro where you make on and i can put more into the macro coding, the job i done.

I have uploaded new photos
 

Attachments

  • 1 - Destinationworkbook.PNG
    1 - Destinationworkbook.PNG
    174.3 KB · Views: 10
  • 2 - Location workbook.PNG
    2 - Location workbook.PNG
    141.4 KB · Views: 10
  • 3 - Row in need data from.PNG
    3 - Row in need data from.PNG
    130.3 KB · Views: 10
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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