Substituting Text In A Cell For A Worksheet Name In A Formula

Feb 18, 2010

The content of cell "animal!A1" will change according to a simple vlookup table. Let's say the value can be "dog", "cat", or "horse". In cell "animal!A5", I want to duplicate the content either "dog!A5", "cat!A5", or "horse!A5", depending on the current value of "animal!A1".

I've tried to do a simple reference like:

="A1"!A5

or

=A1!A5

wanting the A1 to actually read either dog, cat, or horse so the reference would refer to the worksheet of the same names. This doesn't work, so I need to know if there is a way to do this.

View 9 Replies


ADVERTISEMENT

Substituting Numbers With IF Function?

Oct 18, 2012

telephone codes in SA begin with the international code of 27 which when followed by a mobile number drops the zero from the Mobile numbers. eg 27722732415 without the SA code should be 0722732415. i want to remove the 27 and substitute it with a 0 ONLY if it occurs at the beginning of the number and not when it occurs in elsewhere within the telephone number

View 8 Replies View Related

Substituting Values From A List

Nov 18, 2006

Master List:

AA1/AB1-Bailey
AA2/AB2-Johnson
AA3/AB3-Madison

JA1/JB1-Parker
JA2/JB2-Evans
JA3/JB3-Metz

MA1/MB1-Hill
MA2/MB2-Reynolds
MA3/MB3-Sanders

I run a report that generates a list like this:

I need a way to convert the AA1,AA2,etc. in column B1 to the names they represent, when I paste my report in. The values in B1 vary each time the report is ran and there are 2 values for each name so I need it to always resolve to the right name.If anybody has any ideas,like a macro or formula,

View 9 Replies View Related

Substituting Texts From Specified List

Dec 1, 2009

Got the following data in different cells:

And on a different sheet in the same workbook, have 45 different values to be converted:

What is required?

Knowing that using a VLOOKUP function, i can compare a value in the first cell to the list and return the desired value, i need to substitute the strings of characters with those the the list of 45 values so that i can proceed with my work.

Basically, for the 1st Cell for eg..

2232-2232-

I will need a formula to replace "2232-" by the value which a VLOOKUP function will give when comparing to the list of 45.

Result shall look like below:

20-20-

Looks simple when have the same set of characters in the cell, but for a cell which has multiple sets:

2210-22G1-45R1-45G1-20R1-20GP-
It becomes difficult for me. What i need exactly is:

Formula to substitute using the vlookup function so that it performs a lookup of the value in the specified cell with the list of 45 values and returns the value (20- or 40-) to be substituted in the cell. What i need finally is a set of 20- & 40- replacing the sets of present data.

View 9 Replies View Related

Substituting Multiple Values For Data Validation?

Jan 3, 2013

trying to substitute out values that i am using in data validation. From the sentence:

Consulting (Logistics, IT, Management)

I would like to remove the spaces, the (, the ) and the commas so that it reads:

ConsultingLogisticsITManagement

So that i can use it for data validation.

In the data validation box i am trying the formula:

=INDIRECT(SUBSTITUTE(substitute(substitute(substitute(c2," ",""),"(",""),")",""),",","")

But i keep getting told i have an error.

View 6 Replies View Related

Convert Text To Formula In Worksheet

Jan 21, 2013

I have put together an excel sheet for how how long a part is on a particular machine. If there are multiple operations on a machine, I separated the operation times with a comma in the cell. I am now trying to get a sum of the total time the part is in a machine. I cannot just use a sum since the commas change the format from number to text. I was hoping I could do a substitution where I change the commas to plus signs and stick an equal sign in front of it and somehow get it to be recognized as a formula instead of a text string. Even then, I would still have to do a sum for the entire row. This is what I have as an example

_______Machine 1______Machine 2______Machine 3_______Machine 4_______Machine 5________Total Time
Part 1 _____20________ 10, 10, 10_________________________________________________________50
Part 2 ____15 ____________30____________________________10_______________________________55
Part 3_______________________________5, 15, 60, 10________________________5________________95

I need a column for summing the row of times (Machine Time). It doesn't need to be a one-cell solution. If I need to add a sheet to the file to do operations on the data that is fine. Again, I do not want to use VBA code. I already have a solution in VBA and am trying to do it in the worksheet only. I can get a substitution working to get a single cell into a format like 10+10+10, but that's the easy part of the battle.

View 1 Replies View Related

Copy Data From Cell In One Worksheet, Add Text, And Paste To Cell In Another Sheet

May 14, 2009

I have the following code in another workbook that is used to populate a cell on the same sheet based on input to cells in column 'A'.

Is it possible to modify this for the attached workbook to select a cell with data (numbers) on the Input Data sheet in column 'E', add text to the beginning, ('CG' in this case), and paste the result to the Import Template in the corresponding cell of column 'A'? I currently have a formula copied to dozens of cells in 'A' but since the number of rows for the Input Template is variable, there are usually cells in 'A' that contain CG but no corresponding data in the rest of the row.

View 8 Replies View Related

VBA To Read Text Formula And Related Constants And Insert As Formula Into Cell

Jul 30, 2014

I have a situation where I have to curve fit data, this can lead to different formulas being used with varying constants.

Is it possible to pickup a TEXT based formula and related constants from other cells, and then place this into another cell as a functioning formula. For Example

Cell A1 contains the formula as a text string whether it be y=a+bx+cx^2, or y=a+b/x, etc
Cells A2:A6 contain the individual constants, a, b, c, etc

I would then want the VBA to read the text based formula and put it into an output cell as a functioning excel formulae.g

In cell B10: =a+b*A10+c*A10^2

I understand picking the constants up and putting the formula should not be too much of an issue, however trying to insert the variable form of the curve fit is the part that I am struggling with, and am unsure if possible.

View 2 Replies View Related

Using Cell Text To Lookup A Certain Worksheet

Oct 13, 2008

I want to be able to look up a cell and do an index lookup on the worksheet with that cells text. Eg.

=index('B2'!A2:E500,match(1,('B2'!A2:A500=E2)*('B2'!C2:C500=D2),0),5).

Where 'B2'! is the worksheet I want to lookup. If cell B2 contained BAZ, the index would lookup worksheet BAZ. If B2 contained TAZ, the index would lookup worksheet TAZ.

View 5 Replies View Related

Using Text In A Cell To Refer To Worksheet Name

Jun 6, 2003

How can I use (with or without macro) cell text to refer to different worksheets inside a formula. For example I've formula =INDEX(Mary!B9:E17...) but I wanted to write that 'Mary' or whatever sheet name to a cell in one sheet and sheet refenrence in this index-formula would change accordingly.

View 5 Replies View Related

Find Last Cell In Worksheet Containing Text

Mar 26, 2008

I have seen a few examples which find the last used cell... but these seem to grab cells that have formulas in them, even though no text has been entered. I need to know how to find the last cell in a worksheet that contains text.

View 6 Replies View Related

Copy A Formula In A Cell And Then Paste Only The Text Of The Formula

Jul 16, 2007

I would like to copy a formula in a cell and then paste only the text of the formula, but I can't figure it out. Basically, I would like to avoid going into the cells and absolute referencing or hitting F2, then copying the text.

When I hit "Ctrl C" to copy the cell, then hit "Alt/E/S/F/Enter" to paste the formula, it is just like a regular copy/paste formula-wise in that the references move.

View 10 Replies View Related

Searching For Text Within Worksheet And Selecting The Cell

Feb 17, 2014

I'm using a command button (p1) within Private Sub P1_Click()

It pulls the activecell as a string (for example $A$1) using a variable called CurrCell, I then want to search this string (currCell) within the worksheet "DATA" and select the cell 3 to the right of it, so that I can change the value.

View 1 Replies View Related

Vba Code To Link A Text Box To A Cell In A Worksheet

Jan 12, 2007

I have built a userform and want the text boxes to access information from a worksheet when I click on the button that displays the userform.

View 3 Replies View Related

Delete All But 1 Worksheet, Add New Sheet & Name As Cell Text

Jun 7, 2007

I need to cycle and extract row data from the A, B and D columns and copy it into another worksheet while maintaining the copied data structure. Right now I am manually selecting the data....

View 9 Replies View Related

Auto-link To Another Worksheet When Text Is Entered In Cell

Dec 8, 2009

setting up a worksheet that forces a link to another worksheet when text is entered.

For instance, I will have several columns in the first worksheet (Sheet 1). For each entry, a tally ("X") will be added under the applicable columns. Most of the column headings are pretty straightforward. To keep things uncluttered, I want one of the columns to have an auto-link (?) feature so that when the user adds an X in this one column (we'll call it Column D), the user will then be auto-linked to another worksheet (Sheet 2) in the workbook. Sheet 2 will have room for more information regarding Column D, Sheet 1.

View 14 Replies View Related

Refer Floating Text To Specific Cell In Worksheet?

Jan 20, 2012

Is it possible to refer a floating text to a specific cell in a worksheet?

View 3 Replies View Related

Moving Rows To Another Worksheet Based On Text In A Cell

Nov 30, 2012

I would like to make a macro that will move rows from one worksheet to another worksheet.

I have an excel spreadsheet with multiple columns and rows, within one of the columns there is some text that refers to SOS or County, I need to move everything that has SOS to another worksheet title UCC SOS and everything that has county to be moved to another worksheet title UCC County. Here is a sampling of the worksheet

Account
Primary Borrower
Corp
Status

[Code]....

View 7 Replies View Related

Hide Multiple Rows When The Text Changes In A Cell On A Worksheet

Oct 28, 2009

The workbook has multiple sheets, and a cover sheet. Each project has a sheet and the status, costs, updates ect. are updated to the cover sheet.

Problem:
What happens is there is a cell which has conditional formatting on it, e.g. If text is Green then colour cell green, if cell text is amber then colour amber and if cell text is Red then colour Red. This works fine.

If the cell text is green then I need a number of rows hidden, if it is amber or red then show the rows.

I have found the following
Sub
If Target.Value = 1 Then
Rows(Target.Row).RowHeight=0
Else
End If
End Sub

Which I have changed to:

Sub
If F4.Value = Green Then
Rows("5,6,7,8,9,10.Row).RowHeight=0
Else
End If
End Sub

So this does not work, need to know why and how to make this work for each sheet I am on e.g. ActiveWorksheet?

View 9 Replies View Related

VBA Copy Offset Cells To Another Worksheet If Cell In Column B Contains (text)

Feb 13, 2014

I want to do the following:

If cells in column B from Sheet 1 contains ''text'',

Copy Cells from column D and F from Sheet 1 - TO - Sheet 2 in columns C and E -

View 1 Replies View Related

VBA Code To Copy Data From Text Box And Input Into A Cell In Another Worksheet

Mar 24, 2009

This is probably far easier then I am making it but I need to take the information that is in a textbox created through the control toolbox and copy and paste that information into a cell on different tab in the workbook. I have tried the infamous google and haven't been able to find much. The excel books that I have don't really touch on the control toolbox functions.

View 2 Replies View Related

Use A Worksheet Reference Cell In A Formula?

Apr 10, 2014

I have a formula to extract the worksheet name and add the "!" to it so it can be used in a copied formula... I'm just having trouble writing the formula to reference the text in the cell with the worksheet name. If it's easier, I also have the list of worksheets without the "!" - e.g., Sheet1, Sheet2, Sheet3, etc...

I want the formula to calculate, in my example, the sum of 2 cells on a different worksheet.

View 6 Replies View Related

Store Worksheet Name In Cell & Use In Formula

Oct 21, 2006

I am trying to use the Indirect function to use the value in a cell to select a sheet with the same name as the value of said cell. I have looked at several posts and attempted multiple methods. I still get an error. I cannot find a thread describing exactly what I am trying to do, which is:

reference a cell value to direct the formula to the correct sheet to then complete an array Sumproduct formula.

Since this description barely makes sense to me reading it, I have attached an example. The problem is in cell C7. Basically, I want cell c7 to look at cell c1 and then go to the tab with the matching name as cell c1 and complete the calcuation.

View 9 Replies View Related

Formula: Cell Value Equals Worksheet Name

Jan 30, 2007

Is there a formula I can use to return a worksheet name. I want cell A1 on Sheet1 to = the name of Sheet2

View 4 Replies View Related

Add Nested Formula To Cell On Another Worksheet

Sep 25, 2007

One of my macros is a tied to a worksheet_change. The macro runs and gives me the result that i want, however excel flips to the sheet that the sub is running for.

example:

Sheet1, Change the cell
excel flips the visible to sheet2
macro runs

Its kinda of annoying. I would like excel to stay on sheet1 where i am trying to finish data entry. I suspect it is how i have writen the macro. Any help at all on how to clean it up.. or a better way to write the same thing would be very appreciated.

Sub TermPlacement()

' Term_Placement Macro
' Uses the Value of Term to insert a formula repeatedly in a colum.

Dim sNFormula As String
Dim rTerm As Range
Dim rStart_Cell As Range
Dim rNpayment As Range

'The reference cell located directly above the first cell in column
Set rStart_Cell = Worksheets("Floor Plan").Range("$B$13")
'Additional set values....................

View 9 Replies View Related

Link A Cell To Another Cell On Same Worksheet Using A Formula

Jan 13, 2010

Is it possible to link a cell e.g. A10 that has a time value in it (there is a formula in this cell that puts in the time value) to another cell in a range of cells e.g. B1:B1000 that has the same time value?

I know someone out there knows how to do this.

View 9 Replies View Related

Display Formula Contained In Cell Within Worksheet?

Mar 11, 2012

I'd like to display a formula contained in a cell within the worksheet. How can I do that?

View 4 Replies View Related

Formula To Put Name Of Worksheet Into A Cell While Worksheets Are Grouped

Aug 5, 2006

The formula in cell A1 of the attached inserts the worksheet name, but it doesn't work when pasted to a group of worksheets. The formula doesn't change from sheet to sheet, yet the results refer to the workheet name where the "paste" was originally done. Does anyone know of a similar formula that would work right when applied once across a group of worksheets?

View 2 Replies View Related

Use Dynamic Formula Driven Text From Cell To Identify And Extract From Specific Cell?

Dec 21, 2013

I paste new data into a sheet of a monthly report I prepare. For this sheet, the # of data rows change (and is unpredictable) every month. I need the value inside a specific cell that dynamcially moves up and down based on the # of rows for that month (because it's below the rows of data).

So I made a formula to identify the exact cell # every month.

Example:

This month the exact cell is F255 in the "Refi" sheet.

So my formula in the "Summary" sheet cell A1 first finds the cell row # only (255) and since it's always column F, in B1 I have

VB:
="F" & (A1)

This outputs "F255" in B1, successfully identifying the target cell.

Now how do I write a formula in C1 to grab the value from whatever cell is named in B1. (For this month, the value in cell F255 from the "Refi" sheet)

View 7 Replies View Related

Use Text In A Cell For A Formula As Cell Reference To Create Range

Mar 10, 2013

I have a list of headings and items and I have a set of formulas that work out depending on the heading what items are listed.

Say theres 10 items and the heading starts at C4 and that heading has 10 items, so it puts "C5" as text in G1 and "C15" as text in G2 so i now know my cell range of items

How can i use the text in those cells to put in a formula to call that as a range?

If I use the indirect formula it shows me the value of the cell, but im after using it to reference the cell

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved