Assign a number to a name

Hi All!

I am working on a spreadsheet that has a number of project names listed in
column A.

I want to assign a ID code to each project and have them be "linked" so that
number will be added to a summary sheet whenever the project name or number
is referenced thru out several sheets within that workbook and an external
workbook.

For example:
Column A (on Resouce Sheet)
Project A= 1
Project B= 2
Project C=3

Through out the worksheets those project names or numbers will show up where
there are dependancies on projects.

ON the Summary sheet, I have a column A named
Project Name

Column B named
Project dependancies

I want to populate the column B with the project ID number if it is located
on the detailed sheets.

Any help would be appreciated, thanks in advance!


Hi all,

I'm trying to assign a number to a value range in a specific cell, then output that number to another cell.

For instance, in cell A1 I may have: 100-105 (with an assigned value of 1), 106-110 (with an assigned value of 2), 111-114 (with an assigned value of 3), 115-119 (with an assigned value of 4).

So when you type in, say, 107 in cell A1, it places the number 2 in an output cell (for example, B1).

How could I accomplish this? On some cells there will be 4 sets of variables, and on some there will only be 2 or 3. I imagine the formula would just repeat itself based on how many variable ranges I have?

I am trying to take column A which has values 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, and 5 randomly in it, like the first value is 5 then 2, 3, 1.5, 2.5, 4, 5, 5...etc, and make a new column. This new column I need to assign a number to the value in column A. So in the new column it would read -15 if column A was 1, -10 if column A was 1.5, -5 if column A was 2, 0 if column A was 2.5, etc. Any help would be appreciated.

Kind Regards.

Greetings,
I would like to assign a number (exm:10) to the word "Red".
so that..
Cell:A1 has the word "Red"
Cell:B1 has a number..lets use 2
Cell:C1 has the formula "=A1+B1
I want the result to = 12 [exmRed which is 10 + 2)=12]

My wookbook will end up with about 50 different words assinged to 50 different numbers.

anyhelp would be greatly appreciated.
Thanks!

hi all,
What should be the syntax if I have a list of first letters of my entries
(looking something like
A
A
B
C
C
C
C
E
J
P
P
P
S
S
T
V

and I wanted to programmatically assign a number to each entry on this list,
restaring the numbering at each letter (e.g., first A would appear as A1,
second as A2, first C as C1, fifth C as C5, etc.)? I know how to compile the
resulting letter with its corresponding numeral, I'm just not sure how/if to
use the MATCH function to count the compounding occurence of each letter on
the list.
Thank you in advance!

I have a master schedule. I was wondering if I could assign a name to a
number, for example George is 3, Bob is two, so that when I put George and
Bob together in a schedule I could get it to add up to 5. Make sense??

Hi All!

I am working on a spreadsheet that has a number of project names listed in
column A.

I want to assign a ID code to each project and have them be "linked" so that
number will be added to a summary sheet whenever the project name or number
is referenced thru out several sheets within that workbook and an external
workbook.

For example:
Column A (on Resouce Sheet)
Project A= 1
Project B= 2
Project C=3

Through out the worksheets those project names or numbers will show up where
there are dependancies on projects.

ON the Summary sheet, I have a column A named
Project Name

Column B named
Project dependancies

I want to populate the column B with the project ID number if it is located
on the detailed sheets.

Any help would be appreciated, thanks in advance!

I'm using different material "plate, angle, tube steel" I would like to
assign a number value to that text. ie. plate would equal .5 Is there a way I
can do this?

Hi,

I'm a total newb at Excel and doing a risk assessment for my company.

I have three risk values, 0.1, 0.5 and 1.0

I would like to assign these values to the words Low, Medium and High,

Or better yet, the strings

Low (0.1), Medium (0.5), High (1.0)

Basically, I just want these words in a cell to reall mean a number

So in my spreadsheet, I can have a column with the words

Low, Medium or High and that column can be multiplied by another number
column.

Have googled all over for this and searched help, but can't find anything
quite this simple that I can still understand. Can anyone tell me how to do
this?

While I can get buy using two columns for now and cutting and pasting etc...
this is an ongoing project so I'd like to get this to work so when I change a
value from medium to low, the final risk value will change.

Thanks
--
If a man speaks in a woods and there is no woman there to hear him...
Is he still wrong?

I am trying to see how I can assign a number value (10) to a letter (X) that
is typed into a cell. Everytime I type (X) I want it to represent the number
(10) in any formulas that I want to use it in. So, if a type (X) in seven
cells it should add up to 70. Can I do this?

I need to make a work sheet for playing a round robin in 8-ball.
Therefore I would like to allocate a number to a name, so that when I type
in numbers it gives me the persons names.
eg. 1 = Paul and 2 = Andrew
so when I put in 1 v 2 it shows that Paul is playing Andrew.

This is very simple, but I can't find a variable assignment function. How
can I assign a number value to a letter grade presented in an Excel table?

Thanks

Has anyone created a macro to create a forms button, assign a macro and name the button? Any info would be appreciated.

I have a bowling league schedule that looks like this:
Lanes 1 2 3 4 5 6 7 8 9
Teams1-2 3-4 5-6 7-8 9-10 11-12 13-14 15-16 17-18
The top numbers represent lanes or alley numbers, and the
second row of figures represent the team members.The team
members numbers represent a name from a list. For this
question the names on the list are a,b,c,d,etc through r
(18 total) I would like to have formula that I could
change the team members numbers to team members names,
i.e,; 1=a, 2=b, 3=c, etc all the way through the number
18 and letter r. I cannot write the formula, I need
someone to give me a details of how to do it. Thanks, WAB

Hi to all, I'm new to this forum. I have a really simple question: what's the right method to assign a value to a cell with VBA?
I have an Excel file with multiple VBA functions, but the most simple (theorically speaking) is making me crazy: I need to assign a value to a cell of one of the sheets, but... I cannot! The sheet is named "TOTALE", the cell is the G7. This is my function (it checks if in a table of the sheet "Foglio" there are some data highlighted and return the number of them. If they are highlighted with pink, it writes the numbers of them in the cell G7 of the sheet TOTALE):
Function GiocTotale(Row1 As Integer, ColStart As Integer, Row2 As Integer, ColEnd As Integer, Foglio As String)

Dim Contatore As Integer, i As Integer

Contatore = 0

For i = ColStart To ColEnd
    If Worksheets(Foglio).Cells(i, Row1).Interior.ColorIndex <> xlColorIndexNone And Trim(Worksheets(Foglio).Cells(i,
Row1)) <> Empty Then
        Contatore = Contatore + 1
        If Worksheets(Foglio).Cells(i, Row1).Interior.ColorIndex = 38 Then
Worksheets("TOTALE").Row("G7").Value = Worksheets("TOTALE").Row("G7").Value + 1
    End If
    If Worksheets(Foglio).Cells(i, Row2).Interior.ColorIndex <> xlColorIndexNone And Trim(Worksheets(Foglio).Cells(i,
Row2)) <> Empty Then Contatore = Contatore + 1
Next i

GiocTotale = Contatore

End Function
Without the Worksheets("TOTALE").Row("G7").Value = Worksheets("TOTALE").Row("G7").Value + 1 the function work perfectly. With it, I get a #VALUE error. I tried everything, but it didn't work. =__=

I'm using different material "plate, angle, tube steel" I would like to
assign a number value to that text. ie. plate would equal .5 Is there a way I
can do this?

I hope I'm putting this in the right forum, if not I apologize and if a mod could move it to the correct area I would appreciate it, I didn't see a forum for question asking.

Using Excel 2007 currently, but have access to 2003 as well.

I'm a novice when it comes to working with Excel, I know a few things but not enough to consider myself proficient so I need a little help with my current project.
I'm trying to create a spreadsheet for my poker league, tracking the point standings for every player as I enter them.
What I would like to do is:
Assign a number to each place position (1st-8th) to be entered beside a players name as they win.

Have Excel autosum the horizontal cells beside each players name with the place values and display the total points on the far right scooting over to stay at the end as I enter in more tournament dates.

Sort in descending order starting with the points leader.

A bonus would be to have it output the standings in a HTML or text friendly format so I can post them on a webpage for players to track from home.

I'm fairly certain if I could figure out how to assign the value to the places, i.e. 1st = 100 2nd = 80 etc etc, I could get the rest to work but for the life of me I can't figure out how to do this. So can anyone provide any assistance, or am I asking to much of Excel and should just write a simple program to do this for me? I was trying to avoid that much work if at all possible. I appreciate any assistance.
DarkS7ar

*edited title* apologies mods.

Edit: Sorry, wrong thread, can somebody move to programming please?

Hello,

Looking for a little help here. Basically what I need to do is assign a macro to a button I create in VBA code. Ultimately what is happening in my program is:

I need a simple way for our program assistant to generate certain data in a fixed way so she can do a mail merge later on. The data she needs is stored in a SQL database. What I want to do is pull a list of SessionID's for her in column A, in column B create a Button that she can click and when clicked with create the excel document that she can use in her mail merge.

I have the SQL code done(for both sections, just showing part 1 now), now I just need to get my button to work. So far this is what I have.

Sub btnS()
     MsgBox ("Test")
End Sub

Sub getData()
    Dim conn As Variant
    Dim rs As Variant
    Dim cs As String
    Dim query As String
    Dim row As Integer
    Dim btn As Button
    Dim t As Range
    
    Sheet1.Cells.Clear
    
    Set conn = CreateObject("adodb.connection")
    Set rs = CreateObject("adodb.recordset")
    
    'The database in this instance has been set as Northwind.
    'you will need to update the database for what yours is called.
    'The IP Address '127.0.0.1' represents localhost.  If you
    'are trying to connect to a remote sql server then you will
    'either need to enter the ip address or URL of that server.
    'In the connection string below, 1433 is the port number
    'the SQL server is listening on.  If your sql server is
    'listening on a different port you'll have to change it.
    '1433 is the default port for SQL Server.
    
    
    cs = "DRIVER=SQL Server;"
    cs = cs & "DATABASE=***;"
    cs = cs & "SERVER=***"
    
    'parameters here are connectionSring, username, password
    'you will need to put the actual username and password in
    'quotes here for this code to work.
    conn.Open cs, "***", "***"
        
    query = "SELECT SessionNumber FROM cerSession WHERE RowStatus = 'A' ORDER BY SessionNumber DESC"
    rs.Open query, conn
    
   
    row = 0
    Do Until rs.EOF
        row = row + 1
        Cells(row, 1).Value = rs.Fields("SessionNumber").Value
        Set t = ActiveSheet.Range(Cells(row, 2), Cells(row, 2))
        Set btn = ActiveSheet.Buttons.Add(t.Left, t.Top, t.Width, t.Height)
        With btn
            .Caption = "Generate"
            .Name = rs.Fields("SessionNumber").Value
            .OnAction = "btnS"
        End With
        rs.movenext
    Loop

     
    'If rs.State = adStateOpen Then
        rs.Close
    '    Set rs = Nothing
    'End If
    
    conn.Close
    Set conn = Nothing
    
    btnS

End Sub
The above code populates column A with the SessionID and column B with a button with the title 'Generate' however when I click the button I get this following error:

"Cannot run the macro 'Book2.xlsm!btnS'. The macro may not be available in this workbook or all macros may be disabled."

even though the btnS call at the end of my code works. Perhaps I am looking at this all wrong but any help would be greatly appreciated. I've spent a few hours scouring Google but nothing has helped so far.

Hi,

would like to know if there is a function that can assign a Number/Value between two Number/Value?

Ex.

0 - 10,000 = 5
10,001 - 20,000 = 10
20,001 - 30,000 = 15
and so on...

hope someone could help...

thanks in advance...
Humphrey[/COLOR][/SIZE]

G:G contains a list of integars, though some cells are blank; lets say 75 of the 100 cells in data range are < 0.

I want a macro which copies a range where the number of rows = the number of values in G:G.

my Macro:


	VB:
	
 myMacro() 
     
    Dim rowRange As Integer 
    rowRange = Count("G:G") 
     
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
This, as you guessed, comes back with an error. Sub or Function not defined.

Anyone the proper syntax for assigning a formula to a variable?

hello,

I have a problem to assign unique numbers to textvalues. I have a sheet with 3 columns (a, b and c). col a contains numbers, col b: contains textvalues, col c should return a unique number. Is there a formula that can give the result in column c as given in the example
col.a b c
1 gr1.1 nb1.22 cf2.1 zx2.2 po2.3 ew2.43 sc3.1 fv3.2 pu3.34 bn4.1 gh4.25 ol5.1

Hope you can help me out guys.

Well I'm not even sure if I worded that question right--that's how little I know...and I am sure there are better ways to do what I want to do but at this point its just a matter of principle; been trying too long to get this to work...
The part I don't know how to do is the assignment of GoodArray1 to CurrentArrayToUse, i.e. "CurrentArrayToUse = GoodArray1" below:

Global NextArrayToUse()
Global CurrentArrayToUse()
Global PreviousArrayToErase()
Global GoodArray1(), GoodArray2(), [etc]
Global CurrentGuessNumber As Integer

[bunch of code, part of which assigns a number to CurrentGuessNumber, then the following...]

Select Case CurrentGuessNumber
Case 1
CurrentArrayToUse = GoodArray1
NextArrayToUse = GoodArray2
Case 2
CurrentArrayToUse = GoodArray2
NextArrayToUse = GoodArray3
PreviousArrayToErase = GoodArray1
ReDim PreviousArrayToErase(0, 0)

[etc]
Thanks!

I have a user form with combo boxes. The user selects items from the combo box and when they click the command button the selection is written to the spreadsheet. Each time the button is clicked it adds an item to the sheet making a list of items. I am trying to assign a number to each item when the command button is clicked so I have numbered list. Here is my code so far:

Private Sub cmdbtnAdd_Click()

Dim RowCount As String

'Writes user inputs to Active Worksheet when Add Item Button is clicked.

RowCount = Worksheets("Sheet1").Range

("A1").CurrentRegion.Rows.Count

With Worksheets("Sheet1").Range("A1")

.Offset(RowCount, 0).Value = ' This is where I have been trying to code in the numbering

.Offset(RowCount, 1).Value = Me.Combobox1

.Offset(RowCount, 2).Value = Me.ComboBox2

End With

End Sub

All and any suggestions are welcome!

I've created a group of shapes, right clicked on it, assigned a macro to it and that fires the macro when the group is clicked.

However, right clicking the group and going to 'assign macro' again does not show the correct macro name. It just says the group name and 'click'

Am I doing something wrong or is this meant to happen?

cheers

Heimir

my worksheet has names and dates when reviews and training is due. I need to
add how many people are up to date and want to add columns totals but can not
assign a value to the cells containing the due dates. Is there a way to
adding how many I have in each column, not counting the ones that are due
shortly? Many thanks