Copy data

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
882
Hi to all of you, Kindly require to provide me support with VBA code, so that that if text, date or numbers e.t.c. exist in col. “M” or “N” to copying and place them in Col. “A”. Therefore, that the numbers of rows are around 500. I present below original data and expected result. Thank you all in advance

Original data

1592558615407.png



Expected result

1592558638072.png
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
How about
VBA Code:
Sub panoos()
   With Range("A7:A" & Range("L" & Rows.Count).End(xlUp).Row)
      .Value = Evaluate(Replace(Replace("If(@m<>"""",@m,if(@n<>"""",@n,""""))", "@m", .Offset(, 12).Address), "@n", .Offset(, 13).Address))
   End With
End Sub
 
Upvote 0
Many thanks once again Fluff! Is perfect and is what exactly i requested. i express my admiration to you for your continue support. Hv a great day!!
 
Upvote 0
My pleasure & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,986
Messages
6,122,611
Members
449,090
Latest member
vivek chauhan

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