Excel - Replace cell letter
Asked By johnc
08-Feb-10 10:41 PM
Not sure how to explain this, but im looking to save a lot of manual entry.
ie. sheet1 is fetching its data from sheet2 A1:A1000 and displays the data
all over sheet1 to many different cell positions in different columns/rows.
How do I point to new data from sheet2 B1:B1000 by replacing all the cells
positions??? Hope it makes sense...please HELP!
John
Jacob Skaria replied to johnc
Try Ctrl+H to launch Find and Replace dialog..Make sure you select 'Formulas'
in 'LookIn'
--
Jacob
How to activate Sheet2? Excel This VBA code works OK if I run it inside the Sheet2, but it fails if I try to start it with a command-button located in Sheet1. Sheet2.Cells(2, 4) = Sheet2.Cells(2, 3) j = j - 1 Sheet2.Cells(j, 5 Sheet2.Cells(j, 3) ' Sheets("Sheet2").Activate Sheet2.Range(Cells(2, 1), Cells(j, 1)).Name = "filterA" Sheet2.Range(Cells(2, 1), Cells
a large application. Basically, running the code with Sheet1 active, deleting a shape(s) from Sheet2. Sub deleteShape() Dim Shp As Shape Sheet1.Protect , True, True, True, True Sheet2.Protect , True, True, True, True ' Sheet1.Protect , False Sheet2.Protect , False For Each Shp In Sheet2.Shapes Shp.Delete Next Shp End Sub As it stands, the code works as expected it to work by either uncommenting the line = 93Sheet1.Protect, False = 94, or, by keeping Sheet2 active. Also runs ok if Sheet3 is active (unprotected sheet). In other words, it seems as if the active sheet has to be unprotected, in addition to sheet2. If someone could confirm that this is correct, I would be most obliged. I ran xl2003 and be done with it. Well, 3 hours later . . .;-) Regards, DaveU Excel Programming Discussions Sheet2.Shapes.Count (1) Excel 2007 (1) Excel 2003 (1) Sheets (1) Shapes (1) JLGWhizThanks (1) Sheet2.Protect (1) Sheet1.Protect (1) Change this: For Each Shp In Sheet2.Shapes Shp.Delete
05 +0100 schrieb Colin Hayes: if E2 is empty, you can use: = IF(AND(OR(Sheet2!H2 = 3, Sheet2!H2> Sheet2!J2), A2 = Sheet2!B2), Sheet2!J2, "") If E2 is not empty, you need a macro. Regards Claus Busch - - Win XP Worksheet_Change(ByVal Target As Range) If Target.Address <> "$A$2" Then Exit Sub With Sheets("Sheet2") If Target = .[B2] And (.[H2] = 3 Or .[H2] > .[J2]) Then [E2] = .[J2] End If End Count, 1).End(xlUp).Row For i = 2 To LRow If .Cells(i, 1) = Sheets("Sheet2").Cells(i, 2) And _ (Sheets("sheet2").Cells(i, 8) = 3 Or Sheets("sheet2") _ .Cells(i, 8) > = Sheets("sheet2").Cells(i
tab in Excel 2007. Sub CopyPhoneNumbers() 'copies data (phone numbers) from a 'specific column of Sheet2 to a specific 'column of Sheet1 when the name (or other data) 'in two more information about the sheet that we copy FROM 'i.e., the source sheet Const sourceSheetName = "Sheet2" Const sourceNameColumn = "A" Const sourcePhoneColumn = "D" ' 'general variables to get the work done ' Dim destWS Name DOB ID# Job PHONE 2 Abe 3 Ben 4 Carla and this layout on Sheet2: A B C D 1 Name Addr City PHONE 2 Ben 3 Carla 123-4567 sheet 1, in cell E2, put this formula (it should all be 1 line) = INDEX(Sheet2!$A$1:$D$4, MATCH(Sheet1!$A2, Sheet2!$A$1:$A$4, 0), MATCH(Sheet1!$E$1, Sheet2!$A$1:$D$1, 0)) To pull it apart and help you modify it: INDEX Sheet2!$A$1:$D$4 The Sheet2!$A$1:$D$4 refers to the entire table on Sheet 2 from upper left
2 specific text values which are there in sheet1, matches with the same text in sheet2 and displays the corresponding value which is there in sheet2 on a cell in sheet1. Let me explain with an example. Sheet1 has data similar should match the Name and Designation in sheet1 with the same Name and Designation in sheet2 and display the corresponding Date and Time value present in sheet2 on to sheet1 Sheet2 has raw data in these headers Date Time Emp Number Name 27-Apr 18:00 to E in both sheets, so in sheet 1 to bring the date enter = index(sheet2!$A$2:$A$10000, match(D2, sheet2!$D$2:$D$10000, 0), match(E2, sheet2!$E$2:$E$10000, 0)) in cell B2 enter = index(sheet2!$B$2:$B$10000