Hi,
I am making a loop to insert values in every Range("A1") of every sheet corresponding. However, when I run the code, it doesn't insert any value.
![]()
Please Login or Register to view this content.
Hi,
I am making a loop to insert values in every Range("A1") of every sheet corresponding. However, when I run the code, it doesn't insert any value.
![]()
Please Login or Register to view this content.
Last edited by SIMBAtheCAT; 06-18-2014 at 12:21 PM.
You aren't looping through sheets, you are looping through the range A1:A10000 on the sheet 'Présentation'.
Does that range have sheet names?
If posting code please use code tags, see here.
Yes, the ranges correspond to sheet names.
There is many more range in this sheet that I want to select the value that is why I'm looping through the sheet.
To loop through the sheets in a workbook you would normally use something like this.
If you have the names of the sheets you want to loop through in column A of a particular sheet then you would do it like this.![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Great, now it copies the value but the wrong ones. Could you help to copy the value just one cell up of the sheet name in the main sheet. Here is how the "Présentation" sheet looks like :
- 3 -
CRTC - SOMMAIRE FINANCIER - SERVICES SPÉCIALISÉS ET PAYANTS
# D'ENTREPRISE Nom du service Titulaire Propriétaire ultime Type Année
tv channel blabla Communications Co- Vidéo sur demande 2013'That is the value I'm looking the copy for every sheet corresponding in Range("A1")
Regina operative Limited operative Limited
Feuille12'That is the sheet name
TCAC = Taux de croissance annuel composé
- 4 -
CRTC - FINANCIAL SUMMARY - PAID SERVICES
# D'ENTREPRISE Nom du service Titulaire Propriétaire ultime Type Année
tvchannel1 inc. Service spécialisé (cat. A) 2013 'That is the value I'm looking the copy for every sheet corresponding in Range("A1")
Feuille13 'That is the sheet name
TCAC = Taux de croissance annuel composé
etcetera ... to "Feuille263" or in English "Sheet263"
![]()
Please Login or Register to view this content.
Last edited by SIMBAtheCAT; 06-18-2014 at 10:44 AM.
To get the cell one row above use Offset(,-1).
![]()
Please Login or Register to view this content.
Perfect, one last issue. It seems to jump a sheet so the last one "Feuille263" is empty and all the titles are on the wrong sheet.
Worst, now the code run but simply does nothing. Here is the file to sort this issue faster (File barely exceed the limit size of the forum) :
Last edited by SIMBAtheCAT; 06-18-2014 at 12:23 PM.
Can you upload an example workbook here?
Click on GO ADVANCED and use the paperclip icon to open the upload window.
Sure, but keep in mind that I had to delete a couple of sheets to make it lighter.
Last edited by SIMBAtheCAT; 06-18-2014 at 12:24 PM.
Oops, mixed up rows/columns in the offset.
![]()
Please Login or Register to view this content.
Perfect! Thanks for your help Norie.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks