is_utf8:0,
 
Search : in
By :

Excel Formulas

Last answer on Jun 12, 2009 6:21:23 pm BST BEAR833, on Oct 14, 2008 10:32:30 am BST 
 Report this message to moderators

Hello,

I am having difficulty copying fromulas on excell from different sheets to form an analysis page.

I have 52 different sheets and need to copy the formulas to an analysis sheet so that i have the amount of each sheet on one page but for it to remain as the same cell. I have tried dragging the formula down but it stays as

=Sheet1!B12
=Sheet1!B13 and so on. the cell number needs to stay the same but the sheet needs to change in each cell down.

can someone help?

Configuration: Windows XP
Internet Explorer 7.0

Best answers for « Excel Formulas » in :
Basic Excel Formulas Show Basic Excel Formulas Below are some basic formulas for Microsoft excel: Basic formula : ADDITION cell A1 to A10 = sum (A1: A10) AVERAGE cell A1 to A10 = average (A1: A10) MAXIMUM cell A1 to A10 = max (A1: A10) MINIMUM...
Excel – Formula for cell calculation Show Excel – Formula for cell calculation Issue Solution Note Issue Simple formula of =J3-SUM(L3:X3) BUT if J3 is empty then I want the formula to run as =C3-SUM(L3:X3) What is the proper formula to get the calculation to utilize J3 if...
Basic Excel Formulas 2 ShowBasic Excel Formulas 2 We saw the SI function Function and is also interesting. Combined with SI, this gives: = IF (AND (condition1; condition2 ;....... conditionZ) true false) displays on the various conditions to be verified (eg...
[Excel]changing cell formula to text Show[Excel]changing cell formula to text Issue Solution Notes Issue Consider that I have: In cell A4, it contains a formula =Sum(A1:B3)+A3/B2. How to extract this formula in cell A6 as a string of text? That is ... I want cell A6...
[Excel] – Countif Formula Show[Excel] – Countif Formula Issue Solution Note Issue I have one excel file in that Column "B" has the "pending or Closed" Status and Column "C" has "Severity 1, Severity 2 and Severity 3" I want to count in one cell with "Pending...

1

Tony68, on Oct 14, 2008 12:37:42 pm BST
  • +3

Hello BEAR833,

I think you will need indirect referencing, a tricky way browsing through your sheets. I can not tell you if there is a more easy way, below is my tip.

First you need a list of your worksheets. For that, I wrote a simple Visual Basic macro (assume you are familiar with "how to run macros"). This will use the current sheet and will list all the sheet names one below the other. The list will appear starting from the top left cell in current sheet. Try it if you like the idea.
Alternatively, you can simply type in the worksheet names in a list.

Sub SheetNames()
For i = 1 To Worksheets.Count
ActiveSheet.Cells(i, 1).Value = Worksheets(i).Name
Next i
End Sub

And the result will be something like this, depending on your actual sheet names:
Sheet1
Sheet2
Sheet3
Sheet4
Sheet5
etc.

Then, you can use referecing excel formula to take the content of the needed cell: e.g.
- Assume your cell to refer to in each sheet is "B12".
- Assume that A1 contains the name of a worksheet.
Enter this formula next to the sheet names above, and you can copy it down simply. "A1" in the formula shall change as you paste downwards.
=INDIRECT(A1&"!B12")

And it will result the content of cell "B12" in sheet named in cell A1
Good luck! Tell me if it worked.

ps. The macro simply overwrites the cell contents in the active sheet. Prevent problems from unintended macro runs, so please run it only if required. Also I suggest to delete the macro from the file which you might pass on to someone.

regards,
Tony

Reply to Tony68

4

khubs, on Dec 20, 2008 11:08:03 am GMT
  • +1

Dear tony,
thanks for providing a exact solution of the query. it is really help me out in this problem. however i have one more query related to this problem that when run this macro the list of worksheet will printed from first cell of the worksheet. Col is easily changed from(i,1) to (i,3) however the row position is not changed, i try many different combination like using nested loob but cant get the required solution

actually i want to list my sheetname in sheet9(6,3)
i want to print the worksheet from where i needed not from the first cell of current sheet

your efforts would be highly appreciated in this matter

thnks

BR,
KHUBS

Reply to khubs

8

B, on Feb 18, 2009 9:06:25 am GMT
  • +3

Hello,

I tried the solution provided by you but somehow indirect function does not work. It gives error #Name? when I say give =INDIRECT(A1&"!B12") it say error at "!B12" Please help

B

Reply to B

9

CowgirlBikerBabe, on Feb 21, 2009 3:44:49 am GMT

I just utilized this solution for my spreadsheet and I got the error as well. I created my sheet list by typing their names in as there were only 10 sheets for me. I fixed the error by making sure that the sheet names in my list had the single quotes around them. The single quote ' in a cell will cause the cell to treat the characters as if the format was text bypassing the current cell formats. This means that I had to put TWO single quote marks before my sheet names and one after. So my sheet name list read ''sheet 1' ''sheet 2' and so on - and then the formula worked like a charm and saved me countless hours!

Reply to CowgirlBikerBabe

13

mubashir aziz, on Apr 30, 2009 8:44:43 am BST
  • +2

Write this formula in Cell B , C and any one else but not in Column A ..... Column A contains the values

A
1
2
3
4
6

and in Column B write this formula and drag it down
=INDIRECT("Sheet"&A1&"!"&"B12")

you will get the result

=Sheet1!B12
=Sheet2!B12

Reply to mubashir aziz

11

Shefali, on Apr 8, 2009 2:13:05 pm BST

Hi Tony,

I faced same problem of putting all the sheets name in single sheet. I used your VB macro and it worked beautifully! Thanks :-)

Now I need to link these sheet names to respective sheet, so that if I click on the name of the sheet I can directly go to the respective sheet and view the data. How to do that?

Please hlep.

Thanks,
Shefali.

Reply to Shefali

12

ina, on Apr 29, 2009 4:46:10 pm BST
  • +1

I had the same problem and simply wrote a list of my sheets and than used the indirect command as you proposed. It worked. Thanks a lot!

Reply to ina

2

Dhanish Sharma, on Oct 21, 2008 4:51:33 am BST

Hi,


You need to copy the whole formula then paste it into the spacial value in formulas then your Problem will be sort out.



Regards'
Dhanish

Reply to Dhanish Sharma

3

sam, on Nov 5, 2008 1:53:40 pm GMT

I didnt understand wat u r asking ....
this site is not giving so comlete and brief info . dont u think so ??

Reply to sam

5

joshi, on Jan 22, 2009 11:23:24 am GMT
  • +1

Please give me the formula of excel worksheet the student who get 35 or miore marks in each subject who pass, and less then 35 fail

Reply to joshi

6

LYN, on Jan 28, 2009 2:48:54 am GMT
  • +1

In exel, what is the formula,when you are copying the data on sheet 1 into sheet2 or sheet 3...in direct way not like highlight then copy,then paste to the shet2...not like that i need formula in direct copying data from sheet 1 to sheet2 or sheet3

Reply to LYN

7

dharmaveer, on Feb 16, 2009 4:54:32 am GMT
  • +4

To copy the formula without changing cell referrence.... we have one way.

ex: in cell 'a1' we have a formula as 'c1+d1' and if we copy the cell/formula to a10 then the formula will be copied as 'c10+d10'.

if you dont want like this, then change formula in cell 'a1' as " $c$1+$d$1".

Reply to dharmaveer

17

 mb20cute, on Jun 12, 2009 6:21:23 pm BST

Thank you so much for this. I have been trying to find out how to do this for ages. :)

Reply to mb20cute

10

Architek, on Mar 6, 2009 11:44:13 pm GMT

I always change the cell name from B1 to something of a particular static description like FAXNUMBER so when I reference it in any of the sheets it points back to that one cell in the workbook.

Reply to Architek

14

mubashir aziz, on Apr 30, 2009 11:16:28 am BST
  • +2

Write this formula in Cell B , C and any one else but not in Column A ..... Column A contains the values

A
1
2
3
4
6

and in Column B write this formula and drag it down
=INDIRECT("Sheet"&A1&"!"&"B12")

you will get the result

=Sheet1!B12
=Sheet2!B12

Never ashamed to get or give Advise.
Muhammad Mubashir Aziz , Lodhran

Reply to mubashir aziz

15

Gutty, on May 4, 2009 2:03:30 pm BST
  • +3

The INDIRECT function works perfectly, except for one minor detail of the formula. As you stated in your example:

Write this formula in Cell B , C and any one else but not in Column A ..... Column A contains the values

A
1
2
3
4
6

and in Column B write this formula and drag it down
=INDIRECT("Sheet"&A1&"!"&"B12")

you will get the result

=Sheet1!B12
=Sheet2!B12

The only problem with it is that Excel needs the apostrophe (') when referenceing sheet names. so to actually get the value from the different sheets, you will need to add an apostrophe before referencing the sheet and also just before the "!"

The forumula would then be: =INDIRECT("'"&A1&"'!B12") where A1 is the worksheet name that you would like to grab the number from and B12 is the cell on that worksheet that you want to pull. Also note the "'" is actually quotes-apostrophe-quotes and there is also an added apostrophe before the !.

Reply to Gutty

16

Nick, on Jun 10, 2009 9:19:30 pm BST

This helped me so much. I had an excel worksheet that had 100+ sheets. Using the macro and the hint about the single ' fo quoting a sheet name really helped! You have no idea!!!!!!!

Reply to Nick