ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   In Excel can I make a letter value equal a specific number (https://www.excelbanter.com/excel-discussion-misc-queries/214112-excel-can-i-make-letter-value-equal-specific-number.html)

JDSkiing

In Excel can I make a letter value equal a specific number
 
For example, If I wanted every time the letter F was input as data that,
within the fields marked that F would equal the number one, then for example
G would equal 1.5, so that if a row had three F's and 2 G's it would equal 6
if I totalled the row across. This is a simple xample of what I am trying to
accomplish, but if someone can show me this I can figure out the rest.
Thank you
James Deutschkron

ExcelBanter AI

Answer: In Excel can I make a letter value equal a specific number
 
Yes, you can definitely do that in Excel. You can use the VLOOKUP function to achieve this. Here are the steps:
  1. Create a table with two columns - one for the letters (F, G, etc.) and the other for their corresponding values (1, 1.5, etc.). Let's say you create this table in cells A1:B3.
  2. In the cell where you want to input the letter (let's say it's cell A4), type in the letter F.
  3. In the cell where you want the corresponding value to appear (let's say it's cell B4), use the VLOOKUP function. The syntax for the VLOOKUP function is as follows:
    Code:

    =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
    . Here's how you can use it in this case:

    Code:

    =VLOOKUP(A4, A1:B3, 2, FALSE)
    Explanation of the arguments:
    - lookup_value: This is the value you want to look up, which is the letter F in this case.
    - table_array: This is the range of cells that contains the table you created in step 1, which is A1:B3 in this case.
    - col_index_num: This is the column number in the table that contains the value you want to return, which is 2 (the second column) in this case.
    - range_lookup: This is an optional argument that specifies whether you want an exact match or an approximate match. In this case, you want an exact match, so you should set this to FALSE.
  4. Copy the formula in cell B4 and paste it into the other cells in the row where you want to input letters and get their corresponding values.
  5. To total the row across, simply use the SUM function. For example, if you want to total the values in cells B4:B8, you can use the following formula:

    Code:

    =SUM(B4:B8)

Gary''s Student

In Excel can I make a letter value equal a specific number
 
Say the row is B1 thru Z1. In A1 enter:


--
Gary''s Student - gsnu200821


"JDSkiing" wrote:

For example, If I wanted every time the letter F was input as data that,
within the fields marked that F would equal the number one, then for example
G would equal 1.5, so that if a row had three F's and 2 G's it would equal 6
if I totalled the row across. This is a simple xample of what I am trying to
accomplish, but if someone can show me this I can figure out the rest.
Thank you
James Deutschkron


Gary''s Student

In Excel can I make a letter value equal a specific number
 
Say the data is in A1 thru Z1, In A1 enter:

=COUNTIF(B1:Z1,"F")+COUNTIF(B1:Z1,"G")*1.5

--
Gary''s Student - gsnu200821


"JDSkiing" wrote:

For example, If I wanted every time the letter F was input as data that,
within the fields marked that F would equal the number one, then for example
G would equal 1.5, so that if a row had three F's and 2 G's it would equal 6
if I totalled the row across. This is a simple xample of what I am trying to
accomplish, but if someone can show me this I can figure out the rest.
Thank you
James Deutschkron


JDSkiing

In Excel can I make a letter value equal a specific number
 
Thank you for the response, am I also able to use more than one letter for
example would =COUNTIF(B1:Z1,"F")+COUNTIF(B1:Z1,"FF")*1.5, also work if FF is
equal to 1.5, and can I copy this formula down among multiple rows

"Gary''s Student" wrote:

Say the data is in A1 thru Z1, In A1 enter:

=COUNTIF(B1:Z1,"F")+COUNTIF(B1:Z1,"G")*1.5

--
Gary''s Student - gsnu200821


"JDSkiing" wrote:

For example, If I wanted every time the letter F was input as data that,
within the fields marked that F would equal the number one, then for example
G would equal 1.5, so that if a row had three F's and 2 G's it would equal 6
if I totalled the row across. This is a simple xample of what I am trying to
accomplish, but if someone can show me this I can figure out the rest.
Thank you
James Deutschkron


Gary''s Student

In Excel can I make a letter value equal a specific number
 
Yes.

There nice thing about this approach is that you can extend it to cover a
lot more codes.
--
Gary''s Student - gsnu200821


"JDSkiing" wrote:

Thank you for the response, am I also able to use more than one letter for
example would =COUNTIF(B1:Z1,"F")+COUNTIF(B1:Z1,"FF")*1.5, also work if FF is
equal to 1.5, and can I copy this formula down among multiple rows

"Gary''s Student" wrote:

Say the data is in A1 thru Z1, In A1 enter:

=COUNTIF(B1:Z1,"F")+COUNTIF(B1:Z1,"G")*1.5

--
Gary''s Student - gsnu200821


"JDSkiing" wrote:

For example, If I wanted every time the letter F was input as data that,
within the fields marked that F would equal the number one, then for example
G would equal 1.5, so that if a row had three F's and 2 G's it would equal 6
if I totalled the row across. This is a simple xample of what I am trying to
accomplish, but if someone can show me this I can figure out the rest.
Thank you
James Deutschkron



All times are GMT +1. The time now is 06:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com