• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Set value of second cell based on first cell in a range.

Hi all,

My data is in range A1:L10

If cell (A2) value is 1 then range A3:A10 values has to be 1.

Likewise for columns B:L

Thanks in advance.

Ashok
 

Attachments

  • sample.xlsx
    8.3 KB · Views: 4
Hi ,

Just as you say that your input data range is A1:L10 , can you manually use another range to indicate what the output will look like ?

Manually enter the expected output in the range A12:L21 , and then upload the workbook.

Narayan
 
Hi ,

Run the macro named FillDown in the attached file.

I assume that there is no data in those cells which are not having 1 in them , since the macro will overwrite all cells in the specified range.

Narayan
 

Attachments

  • sample - output.xlsm
    12.5 KB · Views: 3
@Narayan

It worked great. Trying to understand the macro.

Meanwhile, i need to to fill values in reverse order for another condition.

If cell (A2) value is 1 then range A1:A2 values has to be 1.

Likewise for columns B:L,

Attached the output file for your reference.

Thanks for your help.
Ashok.
 

Attachments

  • sample - output - Reverse .xlsx
    8.4 KB · Views: 1
Last edited:
@NARAYANK991

While using the macro "FillDown", Remaining cells are filled with value"0" (for ex. A1, B1:B3, C1:C6,...)

But using the macro "Fillup", remaining cells are NOT filled with value "0".

Can you modify the macro "FillDown" so that remaining cells are not filled with "0".

Thanks
Ashok
 
Back
Top