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.
Related
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)
I'm creating a vacation tracker in excel. The first sheet pulls the data from SharePoint which has Start Date, End Date and a Date Difference calculation.
Sheet1
A2=12/16/2015
B2=12/20/2015
C2=5
The second sheet is the visualization of the data. It starts with cell B1 and goes out for 90 days. It is a word representation of the date. Here is the formula I'm using =UPPER(TEXT(B2,"DDD"))
Sheet2
B1=WED
C1=THU
D1=FRI
E1=SAT
F1=SUN
The next row always B2 has a formula which is always today's date. From there I add one date to increment the dates out to 90 days. B2=Today() and the other cells =B2+1 and so forth
B2=16
C2=17
D2=18
E2=19
F2=20
What I'm trying to do is have the start date and end date highlighted on Sheet2. For example the boss is out on vacation from 12/16/2015 until 12/20/2015. I need the cells B3-F3 on Sheet2 highlighted in Red. The secretary who is on leave from 12/17/2015 to 12/19/2015 have her cells highlighted in another color from cells C4-E4.
This will probably take some VBA I just need a starting point. I tried using a VLOOKUP to pull the data, however the using a range from another sheet is not working. And to be honest I do not know if this is the correct approach.
Conditional formatting for B2:ZZ2 at Sheet2
=AND(B2>=Sheet1!$A$2,B2<=Sheet1!$B$2)
And select the color you like
My question is as follows:
I have an excel workbook with two worksheets. The first worksheet has my bills listed in rows, and paydates in columns. The second worksheet has a weekly cashflow plan with spots corresponding to various bills in the first.
I would like the cash flow worksheet to update the cell to the dollar value of the bill if its due. I have attached a link to my box with the excel file. Screen shots are below as well. In the screenshot examples, for instance, i would like the Electricity Cell in Cash flow sheet to Show $238 since the Electricity in the Bills sheet for the current week has an X in that location.
Excel Workbook
Any help that can be provided would be greatly appreciated.
If I understand what you want to accomplish correctly, your dates on the first worksheet (E3, F3, etc) need to be changed to Thursday dates - they are Wed dates right now.Also, you need the descriptions in column B of the first sheet to exactly match the descriptions in column A of the second sheet. This is why accountants like to use account numbers instead of account descriptions when possible.
If you change those here are your formulas:
Second sheet cell A2 - =IF(WEEKDAY(A3)<=5,A3+5-WEEKDAY(A3),A3-WEEKDAY(A3)+7+5). This checks the day of week of the current date then adds days as needed. It seems like there might be an easier way to get this.
Second sheet cells B6, B7, B8, B10 ,etc = =IF(HLOOKUP(A10,$F$4:$J$8,MATCH(A12,$D$5:$D$8,0)+1,FALSE)="x",VLOOKUP(A12,$D$5:$E$8,2,FALSE),""), The hlookup determines if there is an "x" in the current week and the vlookup pulls the amount from the correct line.
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)
In an Excel worksheet, cell C1 contains a date. I would like a macro that checks the date in C1 and if the same date is mentioned in row 3, then copy all matching date data beneath it from D6 downwards, paste to Sheet2, cell B3 and also copy column A downwards from row 6 to Sheet2, cell A3.
Use Excel's macro recorder to record your keystrokes and mouse actions (as Excel actions) then inspect the resulting macro. Using Excel's help, check the topic Create a macro or visit http://office.microsoft.com/en-us/excel-help/create-a-macro-HP005204711.aspx. This will get you started.
are you checking the date in C1 against any column in row 3? or in D3? or C3? It is not clear.
copy A6 down and D6 down, but switch column D to B on sheet2 and A to C on sheet2?
This could be easy if it were clearer what you are checking.