Solved

Appending one number to another (& Operator??)

Posted on 2002-03-30
3
129 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
  • 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now