Substitute Function: Trying to incorporate variables.

  • Thread starter Thread starter motrctyman
  • Start date Start date
M

motrctyman

I am trying to utilize Excel to create a parts list based off of
worksheet I created to estimate jobs.

Specifically, I would like to use the substitute function to substitut
an item quantity of 1 to enter in a part number in a seperate column
I have sucessfully done this with the following equation:

=SUBSTITUTE(C59,"1","Pioneer abc123")

This will provide part number "Pioneer abc123" anytime the quantit
required is "1".

My dilema is trying to account for a varying quantity, say, may var
from 1 to 100?

Is there anything similar that is used in a query where there may be
wildcard or ">="?

Or possibly one of you much wiser than myself can think of a bette
way?

Any assistance would be very much appreciated! Thank you in advance
 
I am not sure of your question, but I think you want to examine the
contents of a specific cell, say cell C59, and if its value is one or
more, to have a character string, such as "pioneer abc123," replace the
numeric value stored in the cell.

I don't think you can do what you describe merely with an Excel function
or formula. When computing a spread sheet, Excel works down through all
the cells in the sheet, one row (or column) at a time. In each cell is
imbedded the instructions for that cell. The function or formula in a
given cell can change the displayed value of the cell containing the
formula or function, as well as the values displayed by other cells, but
I can't think of a case where it can change the content of another cell.
If you want to change the content of a cell, you'll need to explore
using a visual basic macro.

Alternatively consider placing the part description in an adjacent cell.
Then you could use an IF function in cell D59 such as:

=if(C59>0,"pioneer abc123","")

windsurfer in LA
 
Back
Top