I have several sheets in my Excel file, all named according to a day of the month (So from 1 to 31). I also have another sheet named "totals". In this sheet I have a MAX function that returns the highest number in cell Q31 from ALL sheets. In short, I ask to Excel: What is the highest number among the 31 "Q31" cells. Excel gives me the answer, for example, 54.
I would rather have Excel give me the name of the sheet where it finds the answer.
Is it possible?
Thanks!
In A1 through A31 enter:
=INDIRECT(ROW() & "!Q31")
then in B1 enter:
=MATCH(MAX(A:A),A:A,0)
(assumes the sheets are "named" 1,2,3,... and the worksheet name corresponds to the row number in column A)
Related
I simply need to copy a number of rows based on the number in a cell.
In Sheet1 I have a table and in Sheet4 I have a list of values.
I require row at A6 to be copied by and then pasted the number of times as specified in F2 in Sheet 4.
start from this (adjust where needed):
range("d4:g4").Resize(worksheets("sheet4").range("f2").value,4).FillDown
Currently taken over a new role at work and I'm wanting to make my job a lot easier.
I have three sheets within one workbook.
Sheet 1 - Config
Sheet 2 - Overall
Sheet 3 - This Week
What I want to do is depending on the date in sheet 1, I want it to find the corresponding date in the headers on sheet 2, and then select the data in the column and paste it to sheet 3.
For example: If Sheet 1 is 13th May 2018
Sheet 2, D2 - D4 will be copied to Sheet 3 B2 - B4
Is this possible in a macro?
Thanks!
Why not simply use a formula ?
In Sheet3, range B2 :
=OFFSET(Sheet2!$A2,0,MATCH(Sheet1!$A$1,Sheet2!$A$1:$F$1,0)-1)
You can copy this formula in Sheet3, range B2:B4
Two things to check :
The format of the date you are looking for.
The size of the range you are looking up for that date. Column F might not be the last column of your data.
I have been working with a excel file with a lot of data, which is arranged in 2 sheets.
I would like to get data from sheet 1 to sheet 2 with reference to the column headings.
For example:
So if I want to find the sum of function 1 person A with criteria 1, the command have to go and find the heading "sum of function 1" in sheet 1 and choose the data that are only under criteria 1 and sum it up in sheet 2 cell D5. (By using column heading reference instead of cell reference).
The table range is A2 : U80.
Thanks.
First you have to format your data as table (select the data -> Menu Insert -> Table). Then you rename your table, for example Table1. Let's say one of the columns you want to sum on the sheet2 is called ColumnName.
On the sheet 2 you write a formula
=SUM(Table1[ColumnName])
The result will be what you are after.
You should try it by SUMIFS(). Syntax will be
=SUMIFS(AgeRange from sheet1,NameRange Sheet1, Name cell Sheet2, PlaceRangeSh1, Place Cell Sh2)
Tell me if requires further help.
I am having a difficult time figuring this out and your help is greatly appreciated!
If there is the same name across multiple sheets, I would like the the number first assigned to them to populate and the remaining numbers to be in numerical order throughout the remaining sheets.
Below is sheet 1. C9 has a star near the name because it is a duplicate in sheet 2 (to follow)
Below is sheet 2. C9 is the duplicate name from sheet 1. I need the numbering for sheet 1 to remain as is and sheet 2 as 1, 8, 9, 10, 11, etc.
I am up for 2 options:
Manually enter 1 in cell B9. When I currently do this on sheet 2, the numbers start over again from 1 as opposed to the MAX number from sheet 1.
Automatically populate number when there is a name match. I have tried vlookup and match with my current formulas and they do not work with continuous numbering.
Below are my current formulas:
Cell B9, sheet 2
=MAX('Sheet 1'!B9:B66)+IF(ISTEXT(C9),1,"")
Cell B10:B66, sheet 2
=IF(ISTEXT(C10),IF(OR(ROW()=9,IF(ROW()=9,TRUE,MAX(INDIRECT("B9:B"&ROW()-1))=0)),MAX(INDIRECT("Sheet"&RIGHT(REPLACE(CELL("filename"),1,FIND("]",CELL("filename")),""),LEN(REPLACE(CELL("filename"),1,FIND("]",CELL("filename")),""))-5)*1-1&"!C:C"))+1,MAX(INDIRECT("B9:B"&ROW()-1))+1),"")
I really appreciate your time and help!!
Assuming B8 in Sheet2 is not numeric, names do not repeat within any one sheet and only two sheets are involved, I suggest in B9 of Sheet2 and copied down to suit:
=IFERROR(INDEX(Sheet1!B:B,MATCH(C9,Sheet1!C:C,0)),MAX(Sheet1!B:B,B$8:B8)+1)
Ive never used vlookups i have a spreedsheet not sure if this is the right function. I have two sheets
Sheet 1
first name last name username
Sheet 2
first name last name employee id business unit
I need in column D on sheet 1 to have employee id ive below. Pay no attention to column letters and sheets because i moved to another sheet to try getting this right.
=MATCH(B11,Sheet1!C:C,0)
Any help is much appreciated.
So you realize you have to match both first and last names? There are several ways to accomplish this depending on how many employees you have in sheet 2: a) small list could a two-column search using array formula; b) large list just create another column in both sheets joining last & first names and do a MATCH or VLOOKUP on them.
Since your needs are simple and to illustrate option (b):
Insert a column in both Sheet1 and Sheet2 after the "last name"; you should now have an empty column C in both sheets.
Assuming you have column headers in row one, and thus data starts in row two, set cell C2 in both sheets with function =B2&","&A2, then fill-down that formula on both sheets in all rows.
Set Sheet1 cell E2 to formula =VLOOKUP(Sheet1!C2, Sheet2!$C:$D, 2, False), and fill-down that formula in all rows.
Voila, employee IDs on Sheet1. I do have to say this is so Excel 101. There are all sorts of examples and tutorials on this easily found using even the most trivial Google searches.