Copy values to different sheet based on values in cell

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
Hello all,

I've been trying to look at similar code to try to put together what I want, and I'm still struggling to get it right, so I figured maybe somebody on here could help me out.

I am trying to copy the values of multiple cells in a single row to a different sheet. The trick with that is the row that I am going to copy depends on which row has a value in F.
So starting with F16 if the cell isn't blank, then G16, I16, & M16 will have their values copied to "Sheet4" B5, B6, & B7. (There are a few more cells, but to simplify things, I just put three.
Now if F16 is blank, we move to F17, then F18, and the formulas will follow, except they are going to the exact same cells on Sheet4. They will always stay the same.

To make things trickier, there will be values in some of the F Column,so I only want to copy data from the last row thats been used within my specified range. (F16:F22, F26:F32, F36:F42, F46:F52)

These rows are all days with the top row being the beginning of the month and the bottom being the end. Numbers should get added in every day, so the third day this runs, it should be looking at the data from row 19.

Hopefully I'm not too confusing:

Any suggestions or help would be wonderful. I'm always open to perhaps an easier way to do what I need :)
 
Last edited:

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

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