Help using a single cell data in a macro

Mike_E

New Member
Joined
Aug 16, 2017
Messages
3
Hello,

I am trying to figure this one out. The goal is, you press the macro buttons and a message gets input into the active cell with the date stamp and time stamp. The formula works, yay me! Now I need to make a section of it call from a specific sheet and cell, to make it user friendly for work. That is where I am stumbling.

The formula that works:

ActiveCell.FormulaR1C1 = "RLI 62486 " & Format(Now() "mm/dd/yyy hh:mm AM/PM")

What I need to do:

Call the 62486 part from cell A1 on a sheet titled User, so that anyone can enter a number there and the macro will use that instead.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi. In much the same way as you already have you build up the string by concatenating parts together:

Code:
ActiveCell.Value = "RLI " & Sheets("User").Range("A1").Value & " " & Format(Now(), "mm/dd/yyyy hh:mm AM/PM")
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,991
Members
452,541
Latest member
haasro02

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