get value the lastrow from sheet to another

MKLAQ

Active Member
Joined
Jan 30, 2021
Messages
393
Office Version
  1. 2016
Platform
  1. Windows
hi
i have data in two columns a,b the col a is date and b the values I would bring the value for last row based on date (today) and copy to cells f5 in sheet2
this is what I got so far
VBA Code:
Sub vv()
Dim rows As String
Dim value As String
Dim concat As String

rows = Range("b1048576").End(xlUp).Row

Dim a As String
'Column
b = "b"
concat = a & rows
'Value in last low is below
value = Range(concat).value

MsgBox (value)
End Sub
 
You are welcome.
No worries! I see that you are fairly new here, and it often takes time for people to learn how to post good, complete questions.
I think one of the most useful things is to post examples of different scenarios, and telling us what they expected results are in each case.
Especially if English is not your primary language, pictures can often say a lot and really help show us what you are after.
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,214,885
Messages
6,122,085
Members
449,064
Latest member
MattDRT

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