Fill blank cells in all named ranges by copying first column in a named range if the first column is not blank

farrukhikram

New Member
Joined
Aug 9, 2020
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Dears,

I am having a data set with multiple named ranges with each range having one row and 14 columns. Column 'D' of each named range is always filled, where the copy will be required, ranges with blank 'D' column can be ignored.

What I want to do is to loop through each named range and determine the following:

  • If it is a named range "based on range name as given in column 'B'"
  • If the first column "D" is not empty
  • If the preceding columns 'E:P' are empty
If the above conditions are met, then I want the macro to do the following:

  • Copy The cell (whatever content, formula or value) from column 'D' in all preceding column 'E:P' in that named range.
I am attaching here the 'mimic' screen shot of the data I am working with.

Any help will be highly appreciated.
Ranges.PNG
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Why is nobody replying to my question? is it not clear? we don't necessarily have to work with the named ranges, we can loop through rows and check all non-empty cells in column 'D' then copy and paste the values to column 'E:P' if they are empty.
 
Upvote 0

Forum statistics

Threads
1,214,838
Messages
6,121,885
Members
449,057
Latest member
Moo4247

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