Combining A String To Reference A Cell

Oct 10, 2008

I'm trying to switch my vlookups to something more dynamic. I keep adding columns to the data sheet (sheet1 for these purposes) and so I have to go back and update all of the other sheets that use the vlookup. (I'll just give an example as sheet2 for these purposes)

So what I have currently:
=VLOOKUP(A5,Data_All,4,FALSE)
Basically the 'A' column in sheet2 has an integer value, and so the vlookup takes that integer and looks up on sheet1 which row corresponds to that integer and then returns that string value.

What I want:
='AO_Cat_' & 'A5'

Basically I have named every cell in sheet1 and the particular value that I want to pull is named "AO_Cat_%name" with the last part being the integer value. I don't know if that make sense or not. For example, on sheet2, A5 might be '16' and so the value that I want to pull is "AO_Cat_16"

If I were to do this from the VBA side of things, then it'd be a simple range("AO_Cat_" & id_number) where id_number was the lookup value. However, I'd prefer to have this directly as a worksheet formula for simplicity purposes.

View 9 Replies


ADVERTISEMENT

Combining Text And Cell Reference With Indirect

Oct 2, 2008

I'm trying to combine text and a cell reference using Indirect. Cell B1 contains the text "Region" (no quotation marks). In another cell I'm trying to create a reference to "Region total" (no quotation marks). By my limited understanding the below should work: =INDIRECT("b1"&" total")

But the cell returns #REF!. I've tried pretty much every combination of quotation marks around different elements of the formula I can think of. Cell B1 is a drop down list, don't imagine that's relevant, but it may be.

View 2 Replies View Related

Combining Two Values In Two Separate Cells To Make A Cell Reference Or Index Refer.

Jul 15, 2009

I want to use a value in one cell as a row designation, and a value in another cell as a column designation. Ultimately, the values will be text which will refer to row and column headers. What formula would allow me to do this? example:

A1 contains B
B1 contains 2
B2 contains "tribbles"

An imaginary function might go like this........

View 3 Replies View Related

Link Reference From A String In A Cell

Jul 27, 2006

I need to have a link to data in another file. The file will be in the same directory, however, the name of the file I need to link increments daily. I have a string being generated already with the name of the file I want to link to. I can easily add a cell reference to that string, but how do I use that string value in a link? Or - how do I use quick'n'easy VBA to snatch the required cell's data?

e.g.
Required data is in the file "production 060723.xls", in sheet "Daily Production", in cell "E2". Current file has a string being generated in a cell:
"\server1production dataproduction060723.xls"

The following day, the required data will be in a file called "production 060724.xls", same sheet, same cell. The current file's string data will also update to reflect the needed file. I know that similar questions have been asked here - but none that I saw in my search seemed quite what I need. Even if someone can direct me to the right thread, that would be great.

View 5 Replies View Related

Check If String Is Single Cell Reference

Jul 6, 2008

I'd like to check if a user supplied string is single cell reference. My problem is that the below code comes back as vallid if I enter a range like B2:B4.


Sub test2()

Dim UserAdd As String
UserAdd = InputBox("Enter your address")

'check if valid:
If ValidAddress(UserAdd) Then
MsgBox ("it's valid!")
Else
MsgBox ("it ain't valid!")
End If

End Sub

View 9 Replies View Related

Convert Cell Number Reference To String Address

May 18, 2007

I have something like the following:

If Worksheets("RawData"). Cells(1, nColumn).Value = Worksheets("RawData").Cells(12, 16).Value Then
..do code (I know the cell location of interest at this point)
End If

Then I End up needing To Do something Like the following
ActiveChart.SeriesCollection(1).XValues = _
Worksheets("RawData").Range("L1:N1")

“L1:N1” above is a sample. Given the code above it I have the cell location in question but it is in the format such as .Cells(12,16). That doesn’t do me much good when range wants something like “L1”. I don’t know how to convert that (12,16) to a L16 for example.

View 7 Replies View Related

Combining String And Integer In Worksheets Name

Feb 19, 2014

for ii = 1 To 3
shts = "XX0" & Str(ii)
Create_worksheet (shts)
Next ii

when I run this, my worksheets are like
"XX0 1"
"XX0 2"
"XX0 3"

what's wrong that I did? How can I do "XX01"...?

View 3 Replies View Related

Reference To Text In A String

Jun 11, 2008

anyone know how to refer to text in a string? vba

View 9 Replies View Related

Userform Object Reference From A String

Feb 28, 2013

Here is the scoop.

I have a userform that has a lot of textboxes that are formatted as date fields. Some of them have a default value and are locked=true, enabled=false. For those ones I have a checkbox next to them so the user can unlock and enable the textbox if they so desired.

Well the checkboxes and textboxes have a similar naming scheme, but are not numeric (they are not CheckBox1, CheckBox2, etc). As an example they one grouping is Cust1RelExpUnlock (this is the checkbox) and Cust1RelExpDateBox (this is the textbox). The difference in their name is the last portion (Unlock or DateBox).

Now when the checkbox is selected the code I want looks something like this:

Code:
Private Sub Cust1RelExpUnlock_Click()UnlockDateBox Cust1RelExpUnlockEnd Sub

Where UnlockDateBox is the function I'm having difficulty with and is supposed to be generic enough to work on any grouping assuming my naming scheme is consistent.

Using a combination of the Left() and Len() functions I can get the unique aspects of the name. Then concatenate it with "DateBox" as required. However I'm getting type mismatch errors, or object required erros. I tried various combinations of Dim _____ As Object, As Control, As Textbox... with no success.

I'm getting the correct name as a string, how do I make it work so I can reference the textbox.enabled/.locked?

Code:
Private Sub UnlockDateBox(Ck)
Dim CkDate As Control 'Tried control, textbox, object
Set CkDate = ProjectInputForm.MultiPage1.Object ' tried just using ProjectInputForm, and Object
Dim CkName As String

[Code] .........

View 4 Replies View Related

Creating String / Lookup / Validation From One Reference Sheet

Apr 18, 2014

I have an endless list of information that I need to turn into a text string, lookup with a validation on the end.

The easiest way is to show you so I've attached the info and what result I want.

Attached File : Test.xlsx‎

View 3 Replies View Related

Excel 2007 :: Reference Last Occurrence Of Text String

Feb 8, 2011

I am running EXCEL 2007 on XP. What is the EXCEL cell formula to put in a cell (for example"E5") that will reference the "last" occurrence of a specific text string in column A (For example Chard ) but will show its corresponding column B content (for example its PH number 3.45) regardless of the number of data entries that will be inputted in the future for both column A and B.

A B C D E
1WINEPH
2Chard3.24
3Merlot3.36
4Cab 3.44
5Merlot3.38 xxx
6Chard3.26
7Chard3.45
8Cab 3.41
9 Merlot3.33
10

View 7 Replies View Related

Change Formula Cell Reference Based On Another Cell Reference

Jan 8, 2012

How do I change a formula cell reference based on another cell's reference? I'm building a schedule that looks to a task's trigger and adds days based on that relationship. All entries in column "A" will be text and all cells in "B" will be the simple formula "=A2" or "=A3". Due date is calculated by adding the value in "C" to the preceding date in column "D". In the spreadsheet below, the trigger for "Budget set" is "Specs written" with 3 days added to the previous due date.

________A________________B_____________C_________D
1 Task___________Trigger_____________Days_____Due Date
2 Design begins__Proj OK______________10____10-Jan
3 Specs written__Design begins (A2)____5____15-Jan (D2+C3)
4 Budget set_____Specs written (A3)____3____18-Jan (D3+C4)

If the trigger for A4, "Budget set", changed from A3 to A2, is there a way that the formula that determines the due date in D4 could read the trigger cell reference in B4 so that the value in the corresponding row in column "C" is added in the date column?

View 4 Replies View Related

Change Current Cell Value If Number String NOT Letter String?

Apr 7, 2014

In sheet1 I have a simple database consisting of 5 columns of data

Column A : Name ie James Jones
Column B : payroll number ie 123456
Column C : shift times ie 1245-2124
Column D : job title ie floor
Column E : comments ie A/L or 0600-1500

what I would like is some code that will go down Column E and if a 'time string' ie 1300-2130 is found then copy this string and paste into corresponding value in column C. If a text string is found ie A/L or Sick or anything like this then ignore and move onto next cell, loop this until all cells in column E have been checked.

View 4 Replies View Related

Absolute Reference (cell Reference Behind The Table)

Mar 11, 2009

I have a table that displays data from another worksheet. This is what the cell reference behind the table look like:

View 2 Replies View Related

Cell Reference :: Formula To Reference New Cells

Feb 15, 2010

I have lets say 12 months of data. I have formulas that reference the latest 6 months. When I insert a new column to input a new month, how can I make the formulas include the new months without manually updating them.

EXAMPLE:

12 months of data exist in cells B3:M3 going from B3(oldest) to M3(newest). Formulas reference latest 6 months of data in cells H3:M3. When a new month hits, I insert a column after column M.I would like the formulas to now reference cells I3:N3 which is now the newest 6 months.

View 14 Replies View Related

Convert Cell Reference To Worksheet Reference

Jul 20, 2014

I have a workbook with 1000+ worksheets, all of which have 3-letter names. On a master sheet, I would like to make a query of how many non-empty cells there are on a subsidiary worksheet. This works:

Code:
=COUNTA(ABC!A:A)
What I'd like to do from time to time is input in column A a varying set of 3-letter worksheet names, say

AAB
ABC
CDE

And have a formula in column B that converts this to

=COUNTA(AAB!A:A)
=COUNTA(ABC!A:A)
=COUNTA(CDE!A:A)

I've learned that simply substituting the cell references A1, A2, A3 for AAB, ABC and CDE doesn't work. What do I need to do to achieve this?

View 2 Replies View Related

Reference To Cell Column Letter By Reference To Another Cell Value

Apr 25, 2014

Let's say I've ended up with the number 8 in Cell D4 for example. Is there a formula that can return the letter "G" (The 8th Column) so I can use it in future cell references ? If so, let's say we store that in Cell B5. How do I now refer to a cell in a chosen Row of that same Column by reference to Cell B5 ? For example if I want to refer to Cell G33 can you refer to this Cell in some form like Cell(Contents of Cell B5;33) ??? Don't want to use R1C1 type references if possible.

View 9 Replies View Related

Insert String And String Variable Into Cell

Feb 18, 2014

I'm using a userform to create a new sheet. The form already creates the sheet and names it what was typed into the userform. Now I want it to place that variable in a cell along with a string. the following code will place the variable from the form (tbname) into cell b5.

View 2 Replies View Related

Combining Two Functions Into One Cell?

Jul 23, 2014

I am trying to combine the following two function into one cell. The second column contains a "space" before the number. The third column is the result. =CONCATENATE(Q2,",",+R2) and =SUBSTITUTE(K2," ","")

Here is a sample table with showing the data and result

4
5L
4,5L

5
6R
5,6R

5
7L
5,7L

6
10R
6,10R

6
3L
6,3L

View 1 Replies View Related

Combining 2 Formulas In 1 Cell?

Jan 13, 2014

I am looking at combining 2 formulas and have them in a single cell. Currently I am using this one =IFERROR(IF(S3-V3=0,"Completed within agreed time!",S3-V3),"") if the value =0 but need another one if there's no value in V3 it would say "Outstanding" I have tried to add IFBLANK to the existing formula but I must be doing something wrong as it doesn't work.

View 1 Replies View Related

Combining Cell Values?

Nov 26, 2008

I'm having trouble combining some values in cells. For example in cell A1 i have the value 372-25. In cell B1 i want to make A1 part of another value (it is an APN if you must know). So that cell would be 011-372-25-11. I would be adding 011 as a prefix to each cell and 11 as an ending. I'm sure there must be an easy way of doing this.

I have tried
=011-A1-11
="011-"A1"-11"
="011-A1-11"

View 4 Replies View Related

Combining MAX, ROUNDUP & IF For The Same Cell

Feb 22, 2010

I am trying to create one formula (in one cell) so that it performs the following three things:

1) Rounds any number to the nearest dollar

2) Makes the minimum dollar value $2.00

3) If another cell (G2) reaches $100.00 or more, I want it to revert to another cell's (B2) value.

So, in essence, I want to combine the following two things:

=MAX(2,ROUNDUP(F2,0))
AND
=IF(G2>="100",B2)

I do not know how to correctly order these so that it performs all three things I'm looking for it to do. I've posted this before, but was given an answer that created a circular reference and did not make the minimum value $2.00.

View 7 Replies View Related

Combining Cells Into One Cell

Sep 17, 2009

I am trying to combine multiple cells into 1 cell per row.

I would have "A" column empty, then combine "B", "C", and on into the "A" column.

Each cell value will be separated by a space or any special character I designate in the macro

I have attached an example which the output is separated by a space. Sheet1 has the original file and Sheet2 has the desired output.

View 9 Replies View Related

Combining Cell Values?

Feb 8, 2012

I have the follwoing example. Basically, there is an "X" for each posession of Andrew (cells: B1, C2, D3, E4). What I'm trying to do, in another sheet, is centralize the below information in only one row for "Andrew", with an "X" under each of his posessions (all the 4 "X"-es are now in cells B1, C1, D1, E1).

CarPhoneHouseBoatAndrewXAndrewXAndrewXAndrewX

View 2 Replies View Related

Combining SUM With Fixing A Cell Value

Jun 20, 2008

how can I combine the Formula =(SUM(A2:A100))/(SUM(B2:B100)) with setting a value of the cell D2?

What I want would look like this (in column C):

=(SUM(A2:A100))/(SUM(B2:B100)) with the condition that D2=0
=(SUM(A2:A100))/(SUM(B2:B100)) with the condition that D2=100
=(SUM(A2:A100))/(SUM(B2:B100)) with the condition that D2=200
=(SUM(A2:A100))/(SUM(B2:B100)) with the condition that D2=300

and so on.

The point is that the values A2 to A100 are dependent on the input value in D2.

View 9 Replies View Related

Combining A Text Cell With A Number Cell

Dec 27, 2009

I am using excel 2007 and have the following information:

Cell A1: L6212- (formatted as text)

Cell B1: 05.50 (formatted as custom number 00,00)

When I merge the 2 cells using the concatenate formula I end up with

Cell C1: L6212-5.5

What I want is L6212-05.50

View 10 Replies View Related

Combining Numbers In A Column Into One Cell

Jan 14, 2014

Say I have a column of numbers. I'd like to be able to string them together in the following format: number1|number2|number3....

connect.xlsx

View 3 Replies View Related

Combining Formulas In A Cell And Concatenate

Feb 18, 2010

I am trying to combine this formula with another formula but I cant get it right.
I have multiple worksheets that feed into 1 so I am using this formula to pull in the info.

=II.MissionCritical!C20. This info is a title like "Writing".
=II.MissionCritical!C23. This info is a yes or no.

So I need the =II.MissionCritical!C20 formula to also say if c23 is no add an *** to the front of the title. so the title would look like "***Writing". and if C23 is yes leave the title as is.

View 2 Replies View Related

Combining 2 Rows That Share 1 Cell

Feb 27, 2013

combining 2 rows that share 1 cell so that it is easier to format cells. For example: A4 and A5 have been combined with B4 and B5 to form 1 cell that has content. How can I convert this to a cell that only occupies A4?

View 1 Replies View Related

Combining If And VLookup Formula In One Cell

Nov 19, 2013

I am trying to create one formula that can be copied to other cells to get varied results.

Here are the formulas

1. =IF('Calculated Rental Fees'!H4='Daily Rentals & Charges'!$B$28,'Daily Rentals & Charges'!$B$30,VLOOKUP('Daily Rentals & Charges'!$A$20,LATECHRGETBLE,2,FALSE)*C4

2. =IF(AND(I4>='Daily Rentals & Charges'!$A$36),I4='Daily Rentals & Charges'!$A$38),VLOOKUP('Daily Rentals & Charges'!$A$22,LATECHRGETBLE,2,FALSE)*C4)

Basically i am trying to calculate late fees for a rental company using the if and vlookup functions.

View 2 Replies View Related







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