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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,223,896
Messages
6,175,263
Members
452,627
Latest member
KitkatToby

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