# Find Value & Return Offset Cell Content

Nov 13, 2006

I would like to be able to find all cells in row 2 that are "greater than 0". Then I would like to return the coresponding job number in row 4. I need to create a list of each job with the number of hous spent on that job next to it. I may have 30 different jobs but only 5 jobs that have hours for the specific week.

How I attemted to solve this is to create a table that listed all the hours from the largest number in row 2 to the smallest. Then I found the job number corresponding to that number of hours. The problem with this meathod is that if two jobs have the same amount of hours then the first job number is returned for both values that are the same. See attached example.

## Find Value & Return Contents Of Offset Cell

Sep 3, 2006

On Sheet2 I have a table where I want M2 to do the following:

1.) Look at cell A2 where the name "John" is and B2 where the name "smith" is.

2.) Look at sheet1 and look in B2 and C2 for "John" and "smith"

3.) Once it matches the name, place the contents of sheet1, cell I2 into sheet2, cell M2.

So in short, match the name on sheet2 to the name on sheet1 and return the number in I2 to M2 on sheet2.

Maybe combining the persons name in to one column would make it easier?

## Find Value, Offset & Return Offset To TextBox

Nov 1, 2006

- Find a value on a sheet “ORM” in Column G5:G33

-Get the corresponding value of B5:B33 of that cell

-Place that corresponding value in a canned remark: “You have the number 2 in Block, 12, 14, 25 22.

-Place this canned remark in TextBox31

## Offset Cell Content VBA

May 29, 2014

I am looking for a vba to offset the cells.

The code I have currently is:

[Code] ........

This is only moving the selected cells across one, however - the content of the cells is what I wish to move so cell C25 has data pointing to another sheet cell A1 i.e. =Sheet1!\$A\$1 - can I edit this code so it alters the cell to reference B1, C1 etc....

## Using OFFSET Function To Return The Value From Another Cell With Row And Column Offset

May 31, 2014

I am having some difficulties using a combination of IF and the OFFSET function to display a range of cell values from another column based on a simple condition. The values I need to display at the destination cells should be offset by 8 columns to the right and "X" rows down from the reference column. The value "X" is to be determined via the IF function to check for the row index number.

For example, if Index value "X" = 8, then display the value of B2 in cell I9. IF X = "9", display B2 in cell I10 etc.

I have attached a sample worksheet that provides some examples.

## Find Match In Column & Offset For Return Value

Sep 2, 2007

i tried using the lookup but it gave a different result. i want to search a value from sheet1 A to sheet2 A and copy the remarks from sheet2 B and paste it to sheet 1 B and if not found leave it blank.

here's the attach file i just trim it down.

## Find Yesterdays Date In Range And Return Row Number To Be Used In Offset

Jul 13, 2014

I'm writing a macro that will import data from one workbook to another, based on yesterdays date. I have the import functionality working, and I've been playing all afternoon, but I can't find a way to find yesterdays date in a range and use that row number as the row offset value in this line:

Rather than having a set row offset value (in this case, 14) I would like to use the find function to lookup yesterdays date in range "B50:B80" in the worksheet I've designated as "sh1" and return the row number of the cell that has yesterdays date and use this value as the row offset value, replacing the hard coded 14 that is in there currently. The date values in the range are formatted as per Date Format.jpg.

## Return The Colour Of A Cell As Well As The Content In A Vlookup

Feb 20, 2008

This is probably really basic but can anybody tell me how to return the colour of a cell aswell as the content in a vlookup??

## Return Number Based On Cell Content

Nov 17, 2006

I have a questioner in a excel spreadsheet. Column C have yes or no answers. If answer yes is implied then I want the number 2 to appear in Column F of no is implied then the number 3 will appear. I am having trouble writing the language for this.

## Match Cell Content With Another File And Return Value From Next Column Over?

Sep 29, 2013

I have two files. They both have US census tract numbers in a column GEOID2010. One also has a CSA2010 text description associated with each census tract.

I need to match the cell with a census tract in the first file (example1).xlsx with the census tracts in the second file (example2.xlsx), and then return the CSA2010 text from the next column over to the first file.

I've attached two example files.

## Lookup & Return Offset Data By Cell Value

Jan 30, 2008

The main worksheet in my workbook contains lists of suppliers with unique Vendor Numbers, of which there are approximately 4,500 rows. There is another worksheet which holds approximately 6,500 entries I need to bring data from that sheet to the main sheet using the Vendor Number and the information that is held on 4 columns unique to that number.

The information is a classification system that comprises of 4 columns holding a mixture of numbers and text.

Worksheet 1 has the Vendor Number in Column A and the Classification destination starting in Columns Q, R, S & T.

Worksheet 2 once again has the Vender Number in Column A, and the Classification information in Columns C, D, E & F.

What I need guidance on is how to build the formula to copy the information across, or direction into what other method I should be looking at instead.

## Find Min Then Copy Cell Content

Jul 1, 2009

I have a list of values that are the following:

Column A: City Name
Column B: Distance to destination

Is there a command to find the minimum value in Column B and then copy the corresponding city name into a cell of my choosing.

## Find Cell Content And Copy Row Into New Sheet

Apr 7, 2014

I have tried to these through formulas without success but i think i need VBA also which i am not very experienced.

I want to paste a list in the "InsertList" sheet. This list will only contain the word "Correct" or "False". From then on i need a way to search for the word "Correct" or "False" in the columnS P,Q,R,S,T,U,V.

e.g. If in the column "P" on the "InsertList" sheet the word "Correct" is found, i need that entire row from A to V to be copied onto it's destination, in this case "sheet1".

If the word "Correct" is found on the column "Q" on the "InsertList" sheet, the rows from A to V need to be copied in the Sheet2. And so on..

sheet1.png

Attachment: dropbox.com/s/vgs4kzhoa1pip0a/CopyRows.xltm

## Find 1st Cell With Numeral, Then Offset.

Apr 21, 2008

How would I find the first cell in column A containing a number, like HY42128PP, and then offset 1 row up from there to start my autofilter?

Also, to copy the worksheet headings, what code would copy all rows from row 1, down to 2 rows above the first cell in column A containing numbers, and insert those rows in another sheet?

## Multiple Find And Replace Cell Content Based On Another Cell?

Mar 25, 2014

multiple search match and replace content in a different column so for example

new workbook (look up table)
sku
search1
search2

[Code]....

so something like where you compare two tables and find and replace based on another cell that matches in my sku.. more details would be if the table column aren't exactly matching but the column header and the row header would match and fill or replace in the correct/corresponding cell is there a macro or vba to do this job in excel?

## Find Last Cell In Range, And Changing Another Cell Based On Offset Text

May 4, 2009

If i have a range say E12:O12 and want to find the last cell before blank, lets say it finds m12 as the cell with the value before blank. then with m12 it needs to determine weather row 11 in the same column has Text either "S" or "F" if "S" then m12 = t if "F" then m12 offset(1,-1) = t. And just to make things more difficult i need the range E12:O12 to step 2 as well until it gets to E208:O208 .Noting that row 11 never changes and will always have either an "S" Or an "F"

and also t = time()

## Offset: Find The Last Value Cell In A Row And Display Its Contense

Jan 21, 2010

I need to find the last value cell in a row and display its contense. Is OFFSET the best way of doing it? Cell H3 will need to contain the formula and the row to seach is also row H. In H3 I want the value that is found in the right most cell on row H that contains anything.

## Find & Use Cell Address To Offset On Another Worksheet

Jul 27, 2007

I'm still getting to grips with the Find Command. Basically, I have the below code that looks at a line in a sheet(ws_Site) based on the Line ID Number that is in column A and then Finds that that LineID_Value in a different sheet(ws_main) and copies a value from column I on that line across. Problem is, if the cell I is blank it copies it across and essentially clears the cell if there was data in it.

How can I adjust the below code to only set ws_main.Range(c.Address).Offset(0, 8).Value = LineID_Value if LineID_Value is not blank?

For Each LineID In ws_Site.Range("A7:A" & SiteRows) ' Loop through all the cells in range

LineID_Value = LineID.Offset(0, 8).Value

'Dim c
With ws_main
Set c = .Range("A7:A3000").Find(LineID, LookIn:=xlValues)
'If Not c Is Nothing Then

ws_main.Range(c.Address).Offset(0, 8).Value = LineID_Value

'End If
End With

Next LineID

## Find All Instances Of Cell In Column & Check Offset Cell

May 21, 2008

how to explain this except by showing it, so I explained it as best I could in the attachment. Anyone think they have a solution for this? Let me know if you need more information. Thanks!

the macro will look at the value I entered in cell A1, then find all instances of it in Column A
in every row that A1 matches, if the value in column E is "0", I need the macro to change the value in column E of that row from "0" to (that row's column B * \$B\$1)

## Loop To Find A Cell, Then Copy Offset Paste

Feb 1, 2009

I have a data sheet with employee information. Only one column. It prefixes information with codes, but keeps it in the same cell. I want to move data of certain types into their own columns, but the amount of data is variable, so I cannot simply move every Nth cell, etc.

i.e.

Employee#1
200 Firstname Lastname
204 99999999 (Employee ID)
G38 00005000 (i.e. Pension Deduction)
H38 00007580 (i.e. Benefits Deduction)
X96 00012099 (i.e. Staff Club Deduction)
Employee#2
200 Firstname Lastname
204 99999998
G38 00000775
X96 00001000

So you see some employees may have different codes altogether. But I know that I want all the cells that start with 200 to be offset (-1,1), and all the cells that start with 204 to be offset (-1,2), and so on so that basically I end up with columns of info instead of a one column list.

I have been reading and studying other peoples' macros, and am just starting to grasp the basic. When I wrote my own to accomplish this, I put this together, which doesn't work. But I don't know enough to know what I don't know.

## Offset With Automatically Find Active Cell With VLookup

Jul 30, 2012

I have 2 columns of data

column A = weeks (A2:A50) i.e. P1W1, P1W2, P1W3....P12W4 etc
column B = headcount (B2:B50) i.e. 5, 7, 5...10 etc

Essentially my criteria is "looking for last week and give me headcount" i.e. my lookup criteria is P7W5 ....however if P7W5 has no data, i want the lookup to go up or offset to the row above (it may be one to 4 rows above)....

## Find Date & Pass Offset Cell To Variable

Sep 20, 2007

How do I use VBA to send the value of a cell, for example, cell J77 to the variable "mastervalue1"?

I have a spreadsheet that has a column with dates ( in the format "mmm-yy") and next to it a column that has values. I want to pass the value of the cell that is next to the date cell that contains today's month to a variable in VBA. Auto Merged Post;here's an example of my spreadsheet

## VBA - Find Cell Containing Text And Use An Offset Cell Value In Formula

Feb 13, 2014

I'm trying to do a column of individual discount calculations using a discount percentage found in a cell two to the right of a cell containing the text "Total SP:" that is always upwards and to the left of the cell where the formula goes (but could be two rows or could be 20). There are multiple "Total SP:" cells in the sheet - I always want the first one upwards. I have created the following but I get #NAME? where I hope to see the discounted value.

VB:

Dim Discount1 As Double
Discount = Cells.Find(What:="Total SP:", After:=ActiveCell, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=True).Offset(0, 2)
Range("R9:R" & LastRow).Formula = "=IF(J9>0,\$E9*(1-Discount1),0)"

I've just thought, the Cells.Find needs to be redone for each cell where the formula is inserted to ensure it always catches the correct discount and this isn't going to do that - it's going to find it once and always use that single value.

I think this needs a Loop or something and to move the ActiveCell down one after the formula to get it to redo the Cells.Find.

## Index Match Offset - Find Contents Of Reference Cell

Jun 21, 2012

How can I modify the following formula to find the contents of reference cell, for example if the cell reference (G\$3) is equal to 9 I want it to use 8 instead.

Code:
IF(ISERROR(INDEX(tra!\$E\$2:\$E\$1100,MATCH(G\$3,tra!\$C\$2:\$C\$1100,0))),"",
INDEX(tra!\$E\$2:\$E\$1100,MATCH(G\$3,tra!\$C\$2:\$C\$1100,0)))

I tried using G\$3-1 but this doesn't appear to work.

## Formula: If Value Return Is = To Value Of Cell Above Then Find Return Next Value

Feb 17, 2010

Is there a way with the following formula to tell it that if value return is = to value of cell above then find return next value?

## Macro To Find A Cell Containing Text /select Range Offset / Cut And Paste To Lower Rows?

Feb 4, 2014

I am trying to find a macro that can search a sheet for any cell that contains the text "Not on AOI" selects a range that contains that cell, 81 rows below, and 2000 columns to the right, then cuts the selection and pastes it 162 rows below the original cell where the text was found. What's hard is that the number of columns between the "Not on AOI" cells is variable.

I'm very new to excel macros and the parts I think I've put together are:

Cells.Find("Not on AOI", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=True).Activate

[Code].....

## Read Cell Content & ADD Content + Font Properties *SOLVE

Sep 12, 2007

I use this to read cell content, add some text/characters (ie. [ and ]) and change the properties of the complete cell

Sub COMMENT()
Worksheets("DVD Lijssie").Activate
If ActiveCell.Value 0 Then ' Change all in to ... ... ...
ActiveCell.FormulaR1C1 = ActiveCell.Value & " " & "]" & " " & "["
With ActiveCell.Font
.Name = "Arial Narrow"
.Size = 8
.ColorIndex = 16
End With
End If
End Sub
HOW can I change this vba-code so it leave's the content of the cell like it is and add some content with the use of let's say TexBox1 and ONLY use different font properties for the newely added content?

## Change Content Of One Cell Based On Content Of Another

Apr 18, 2014

Formula/macro/etc that would enable me to have content of a cell changed based on the content of another cell in the same row.

Example: cell in column D says "PSA" - so I would need the cell in column H for that same row to read "Radio"

I would need an entire sheet scanned to review for these occurrences and make the appropriate changes. I also would need the formula to be inclusive enough to scan for variations in column D cell content (PSA 1, PSA 2, etc).

## Lookup & Return Offset Value

Oct 30, 2006

I have a large array of cells that go from A1 to A2500. In VB, I need to take a given date that resides in a cell, say 1/6/2006 in C2, and look for a match of it within this large array. When the match is found, I need it to look in the column to the right (IE, from A5 to B5) and assign the value there to a Cell (C1).

Could someone provide an example of the code I was use in VB for this? I'm having a lot of trouble with it.

## Lookup Value And Return An Offset Value

Jan 30, 2008

I am referencing a value in column A of Sheet 1. I am looking for that value in column B of Sheet 2 and would like to return the value of the cell that is 1 row below and 4 columns to the right (column F). I need to do this multiple times.

Can I use a VLOOKUP/OFFSET combo or Index/Match?

I am writing the formula in column H of sheet 1.