• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Input formula based on a dropdown

Hi,

I have a validation list in cell F5 in Tab ("Control_Sheet")

I code running that drops a date into another workbook

With ActiveSheet
    r = .Range("A" & Rows.Count).End(xlUp).Row
   
    .Range("AO2").Formula = "=TEXT(NOW(),""mmm yy"")"

As opposed to using the date, can i reference where the user has selected the date

the workbook it is dropped into is called currentmonth.xlsx

So it will put the date Month and current year based on the dropdown in format "mmm yy"

Thanks
0
Seamus2626
Asked:
Seamus2626
1 Solution
 
FlysterCommented:
You can reference a cell in a different workbook using this formula:

='C:\Set\Your\Path\Here\[currentmonth.xlsx]Sheet1'!A1

Just change "'C:\Set\Your\Path\Here\" to your workbook path and "Sheet1'!A1" to the sheet name and reference cell with the date you want. In your target cell go to Format - Format Cell - Custom. Set that to mmm yy.

Flyster
0
 
Seamus2626Author Commented:
Perfect, thanks!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now