Help with a macro please

Buns1976

Board Regular
Joined
Feb 11, 2019
Messages
194
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I have a worksheet where cell B2 is populated by a handheld scanner as text, cell C2 is a date that is keyed and cell D2 is an invoice that is keyed and formatted as text.

What I am looking for is when B3 is populated, cells C3 and D3 are populated with the same date and invoice as C2 & D2 and so forth down to row 50!

Any help would be greatly appreciated.

Thank you!!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
How about just a formula?

[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
B​
[/td][td="bgcolor:#C0C0C0"]
C​
[/td][td="bgcolor:#C0C0C0"]
D​
[/td][td="bgcolor:#C0C0C0"]
E​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
1​
[/td][td="bgcolor:#F3F3F3"]
Scan input
[/td][td="bgcolor:#F3F3F3"]
Date
[/td][td="bgcolor:#F3F3F3"]
Invoice
[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
2​
[/td][td](scan text)[/td][td]
26 Mar 2019​
[/td][td]ABCD[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
3​
[/td][td](scan text)[/td][td="bgcolor:#CCFFCC"]
26 Mar 2019​
[/td][td="bgcolor:#CCFFCC"]ABCD[/td][td="bgcolor:#CCFFCC"]C3: =IF($B3 = "", "", C2)[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
4​
[/td][td](scan text)[/td][td="bgcolor:#CCFFCC"]
26 Mar 2019​
[/td][td="bgcolor:#CCFFCC"]ABCD[/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
5​
[/td][td][/td][td="bgcolor:#CCFFCC"][/td][td="bgcolor:#CCFFCC"][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
6​
[/td][td][/td][td="bgcolor:#CCFFCC"][/td][td="bgcolor:#CCFFCC"][/td][td][/td][/tr]
[/table]
 
Upvote 0
So, are you saying that for all the rows between 3 and 50, when column B is populated, columns C and D should automatically be populated with the same values from the row just above it (or should it always pull the values from row 2)?
 
Upvote 0
shg,

That would be the ticket. I was way overthinking that one.

Thanks so much!!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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