Copy value of cell in sheet(1) IF next cell in Sheet(2)is not blank. Paste data into next blank cell of Sheet(2) Col F

RaDoubleD

New Member
Joined
Feb 8, 2018
Messages
1
Hi all,

I tried to summarize it with the title. I have two sheets I'm working with that i'll use index references for.

I want to paste the value in cell "E1" from Sheet(1) to every cell in Col F of Sheet(2) if the adjacent cell in Sheet(2) Col A has a value.

In other words: I have a name on a order form in Sheet(1) that needs to copy and paste to each line of the order after it has been imported into Sheet(2) by my other code.

The pasting should start on the first blank line in Col F and if the adjacent cell (on the same row) in Col A is not blank then past the value of cell F1 in Sheets(1) into that blank cell in Col F for Sheets(2). Then repeat until there is a blank cell in Col A for Sheets(2).

Thank you!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi & welcome to the board.

maybe
Code:
Sub chk()
   With Sheets("Sheet2")
      .Range(.Range("F" & Rows.Count).End(xlUp).Offset(1), .Range("A" & Rows.Count).End(xlUp).Offset(, 5)).Value = Sheets("Sheet1").Range("E1").Value
   End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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