SOLVED

Please Help: Percentage changes from 2 sheet showed on the same cell

%3CLINGO-SUB%20id%3D%22lingo-sub-1440752%22%20slang%3D%22en-US%22%3EPlease%20Help%3A%20Percentage%20changes%20from%202%20sheet%20showed%20on%20the%20same%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1440752%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%202%20data%20sheets%20and%20I%20am%20trying%20to%20show%20the%20percentage%20changes%20resulted%20from%20these%20sheets%20and%20show%20the%20value%20in%20the%20same%20size%20in%20either%20sheets.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20result%20can%20look%20like%20the%20value%20of%20B3%20in%20%22Week%201%22%20sheet%20with%20-10%25%20is%20percentage%20changes%20when%20the%20data%20from%20the%20%22Week%202%22%20sheet%20minus%20the%20ones%20from%20the%20%22Week%201%22.%20Please%20find%20the%20example%20Excel%20file%20as%20attached.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22Percentage%20Changes_Pic%201.png%22%20style%3D%22width%3A%20411px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F196513i551EE344458A6017%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Percentage%20Changes_Pic%201.png%22%20alt%3D%22Percentage%20Changes_Pic%201.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20help%20please%3F%20Thank%20you.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKhanh%20Mai%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1440752%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1441203%22%20slang%3D%22en-US%22%3ERe%3A%20Please%20Help%3A%20Percentage%20changes%20from%202%20sheet%20showed%20on%20the%20same%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1441203%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F689194%22%20target%3D%22_blank%22%3E%40Khanh_Mai%3C%2FA%3E%26nbsp%3B%20short%20answer%20is%20you%20would%20need%20some%20VBA%20code%20to%20do%20it.%26nbsp%3B%20But%20that%20said%20there%20are%20some%20tricks%20you%20can%20do%20to%20get%20something%20very%20similar.%26nbsp%3B%20Follow%20these%20steps%3A%3C%2FP%3E%3COL%3E%3CLI%3E%26nbsp%3BSelect%20BOTH%20sheets%20(this%20will%20make%20these%20actions%20happen%20on%20BOTH%20sheets%20at%20the%20same%20time)%3C%2FLI%3E%3CLI%3E%26nbsp%3BAdd%20an%20extra%20row%20after%20each%2C%3C%2FLI%3E%3CLI%3E%26nbsp%3Badd%20the%20calculated%20difference%20in%20the%20new%20row.%3C%2FLI%3E%3CLI%3E%26nbsp%3Bformat%20new%20row%20(make%20text%20smaller%3F%20bold%3F%20make%20text%20green%20for%20%2B%20and%20(red)%20for%20-%2C%20etc...)%26nbsp%3B%20here%20is%20the%20custom%20format%20I%20used%20in%20the%20attached%3A%20%26nbsp%3B%20%26nbsp%3B%20%3CFONT%3E%5BGreen%5D0.00%25%3B%5BRed%5D(0.00%25)%3B%22n%2Fc%22%3B%40%3C%2FFONT%3E%20%26nbsp%3B%3C%2FLI%3E%3CLI%3E%26nbsp%3BSelect%201st%20pair%20of%20rows%20and%20open%20the%20Borders%20menu%20-%26gt%3B%20more%20borders%20and%20click%20on%20horizontal%20line%20to%20remove%20line%20between%20the%20rows.%3C%2FLI%3E%3CLI%3E%26nbsp%3B(1st%202%20rows%20still%20selected)%20Fill%20white%26nbsp%3B%3C%2FLI%3E%3CLI%3E%26nbsp%3B(1st%202%20rows%20still%20selected)%20Select%20format%20painter%3C%2FLI%3E%3CLI%3ESelect%20the%20rest%20of%20the%20table%20(i.e.%20paint%20the%20new%20formatting%20on%20the%20rest%20of%20the%20table)%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1442457%22%20slang%3D%22en-US%22%3ERe%3A%20Please%20Help%3A%20Percentage%20changes%20from%202%20sheet%20showed%20on%20the%20same%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1442457%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much%20for%20your%20help.%3C%2FP%3E%3CP%3EIt%20is%20simple%20and%20works%20great%20as%20I%20desire.%20The%20selection%20of%202%20sheets%20and%20the%20actions%20happened%20on%20both%20of%20them%20is%20very%20useful%20for%20me.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKhanh%20Mai%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1444666%22%20slang%3D%22en-US%22%3ERe%3A%20Please%20Help%3A%20Percentage%20changes%20from%202%20sheet%20showed%20on%20the%20same%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1444666%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20use%20your%20answer%20applied%20to%20more%20complex%20data%20range%20that%20means%20my%20workbook%20contains%20more%20data%20rows%20that%20need%20to%20insert%20the%20blank%20rows%20(about%20500%20data%20rows)%20(for%20percent%20changes%20stayed%20in)%20between%20each%20data%20row.%20I%20am%20currently%20adding%20the%20blank%20rows%20manually%20but%20it%20seems%20hard%20to%20do%20that%20for%20500%20data%20existing%20rows.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20please%20help%20me%20how%20to%20insert%20the%20blank%20rows%20between%20each%20existing%20row%20easier%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKhanh%20Mai%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1445381%22%20slang%3D%22en-US%22%3ERe%3A%20Please%20Help%3A%20Percentage%20changes%20from%202%20sheet%20showed%20on%20the%20same%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1445381%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F689194%22%20target%3D%22_blank%22%3E%40Khanh_Mai%3C%2FA%3EYou%20could%20write%20a%20quick%20macro%20to%20do%20it.%26nbsp%3B%20Something%20like%3A%3C%2FP%3E%3CP%3Efor%20i%20%3D%20500%20to%201%20step%20-1%3C%2FP%3E%3CP%3E%26nbsp%3B%20activesheet.cells(i%2C1).entirerow.insert%3C%2FP%3E%3CP%3Enext%20i%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20could%20also%20use%20a%20new%20sheet%20and%20create%20a%20formula%20on%201%20row%20to%20ref%20the%20other%20sheet%20and%20the%202nd%20row%20to%20be%20the%20new%20%25%20and%20then%20fill%20down.%3C%2FP%3E%3CP%3EThe%20formula%20on%20the%201st%20row%20could%20use%20the%20new%20FILTER%20or%20traditional%20formula%20like%20offset('Sheet1'!%24A%241%2C(row()%2B1)%2F2%2C0)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1456168%22%20slang%3D%22en-US%22%3ERe%3A%20Please%20Help%3A%20Percentage%20changes%20from%202%20sheet%20showed%20on%20the%20same%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1456168%22%20slang%3D%22en-US%22%3EHello%2C%3CBR%20%2F%3EThank%20you%20for%20your%20suggestion.%20I%20found%20the%20solution%20to%20this.%3CBR%20%2F%3EKhanh%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hello,

 

I have 2 data sheets and I am trying to show the percentage changes resulted from these sheets and show the value in the same size in either sheets. 

 

The result can look like the value of B3 in "Week 1" sheet with -10% is percentage changes when the data from the "Week 2" sheet minus the ones from the "Week 1". Please find the example Excel file as attached.

Percentage Changes_Pic 1.png

 

 

 

 

 

Can anyone help please? Thank you. 

 

Khanh Mai

5 Replies
Highlighted
Best Response confirmed by Khanh_Mai (Occasional Contributor)
Solution

@Khanh_Mai  short answer is you would need some VBA code to do it.  But that said there are some tricks you can do to get something very similar.  Follow these steps:

  1.  Select BOTH sheets (this will make these actions happen on BOTH sheets at the same time)
  2.  Add an extra row after each,
  3.  add the calculated difference in the new row.
  4.  format new row (make text smaller? bold? make text green for + and (red) for -, etc...)  here is the custom format I used in the attached:     [Green]0.00%;[Red](0.00%);"n/c";@  
  5.  Select 1st pair of rows and open the Borders menu -> more borders and click on horizontal line to remove line between the rows.
  6.  (1st 2 rows still selected) Fill white 
  7.  (1st 2 rows still selected) Select format painter
  8. Select the rest of the table (i.e. paint the new formatting on the rest of the table)

 

 

 

 

 

Highlighted

Hello @mtarler,

 

Thank you so much for your help.

It is simple and works great as I desire. The selection of 2 sheets and the actions happened on both of them is very useful for me.

 

Khanh Mai

Highlighted

Hello @mtarler,

 

I am trying to use your answer applied to more complex data range that means my workbook contains more data rows that need to insert the blank rows (about 500 data rows) (for percent changes stayed in) between each data row. I am currently adding the blank rows manually but it seems hard to do that for 500 data existing rows.

 

Can you please help me how to insert the blank rows between each existing row easier? 

 

Thank you.

 

Khanh Mai

Highlighted

@Khanh_MaiYou could write a quick macro to do it.  Something like:

for i = 500 to 1 step -1

  activesheet.cells(i,1).entirerow.insert

next i

 

You could also use a new sheet and create a formula on 1 row to ref the other sheet and the 2nd row to be the new % and then fill down.

The formula on the 1st row could use the new FILTER or traditional formula like offset('Sheet1'!$A$1,(row()+1)/2,0)

Highlighted
Hello,
Thank you for your suggestion. I found the solution to this.
Khanh