Solved

Appending one number to another (& Operator??)

Posted on 2002-03-30
3
135 Views
Last Modified: 2010-05-02
My senario....
on Sheet3 I have cells filled in from A1 to A200
I want to copy Cell A1 from Sheet3 to range ("I9") on sheet1.
At the same time an Inputbox would come up asking the user to enter their job no.
the value of the inputbox would append itself to the front of Cell A1 on Sheet3 and copy it to Range (I9") on Sheet1.
example....
Number in Range ("A1") on sheet3 = Y600
the user would type in the inputbox the number 9999
I want the end result on Sheet1 Range ("I9") to read  9999-Y600 (is it also possible to get the "-" in there too?)
 Or if the user enters 8888 in the inputbox the end result would be 8888-Y600.
the rest of the macro returns back to sheet3 and deletes row 1 so this same number (Y600) cannot be used again and then returns to sheet1 for saving.

Thank you
0
Comment
Question by:He4Giv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 50 total points
ID: 6907788
Hi He4Giv,

There's an excel forum for these questions although it looks a lot like an assignment?

Public Sub GetNewJobNumber()
Dim strJob As String
  strJob = InputBox("Enter job number")
  Worksheets("Sheet1").Range("I9") = strJob & "-" & Worksheets("Sheet3").Range("A1")
  Worksheets("Sheet3").Range("A1:A1").Delete
  Rem don't know if this is neccessary
  ActiveWorkbook.Save
End Sub

HTH:O)Bruintje

PS not tested but i'll leave that up to you ;)
0
 

Author Comment

by:He4Giv
ID: 6907901
This works Great!!
Thanks

PS...Where is the Excel Forum?
Email me at He4Giv@AOL.COM
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6907908
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MsgBox 2 61
VBA: Select SQL query based on a config Sheet v2 11 52
MS SQL Update query with connected table data 3 64
VBA Replace Function - What am I missing? 3 24
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question