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
 

Some videos you may like

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

farrukhikram

New Member
Joined
Aug 9, 2020
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,134
Messages
5,570,364
Members
412,321
Latest member
Yusuf_A
Top