Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Then ?
Is it possible to assign a currancy value to a cell based upon the text
string in another cell? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Then ?
Using a macro - but not with a formula.
You can also look at the Text worksheet function. -- Regards, Tom Ogilvy "Jermert" wrote: Is it possible to assign a currancy value to a cell based upon the text string in another cell? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Then ?
Perhaps I should be more explicit; I have a simple invoice with pull down
boxes in the service description area, these are common items we charge for, the rates for these items is also consistant. What I would like to do is auto fill the Cost @ depending on the pull down item selected. Thanks "Jermert" wrote: Is it possible to assign a currancy value to a cell based upon the text string in another cell? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Then ?
Here's an example:
Sub Test() For Each Cell In ActiveSheet.Range("B1:B2") If Cell.Value = "Test" Then Cell.Offset(0, -1) = Format(Cell.Offset(0, -1), "$0.00") End If Next Cell End Sub -- Dan |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Then ?
This is probably more what you're looking for. Put this code behind
the sheet, not in a module. Private Sub Worksheet_Change(ByVal Target As Range) Dim R As Long R = Target.Row If Target.Column = 1 Then Select Case Cells(R, 1) Case Is = "Oil Change": Cells(R, 2) = "14.95" Case Is = "Tune Up": Cells(R, 2) = "59.95" 'Case Else End Select End If End Sub -- Dan |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
If Then ?
I would assume you have a lookup table in the workbook where you have a row
with the item identifier (from the dropdown) in the left most column and the price next to it. then you would use Vlookup Assume the lookup table is in a sheet named DataSheetName with the identifiers in column A and the prices in column B. the dropdown is in B2 of another sheet (Invoice sheet) in C2 of that sheet as an example =if(B2="","",Vlookup(B2,DataSheetName!A:B,2,false) ) -- Regards, Tom Ogilvy "Jermert" wrote: Perhaps I should be more explicit; I have a simple invoice with pull down boxes in the service description area, these are common items we charge for, the rates for these items is also consistant. What I would like to do is auto fill the Cost @ depending on the pull down item selected. Thanks "Jermert" wrote: Is it possible to assign a currancy value to a cell based upon the text string in another cell? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|