Guys please help me in my RFID project

So I'm doing a RFID project. how do I make more cards be scanned.
basically I want 1 Tag and 4 cards to be scanned, but only 1 tag and 1 card are being scanned.

#include <SPI.h>
#include <MFRC522.h>

#define SS_PIN 10 //RX slave select
#define RST_PIN 9

MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.

byte card_ID[4]; //card UID size 4byte
byte Name1[4]={0x8B,0xBA,0xC8,0x01};//first UID card
byte Name2[4]={0x67,0x1E,0x02,0x04};//second UID card
byte Name3[4]={0xA1,0xC7,0x01,0x04};//third UID card
byte Name4[4]={0x8E,0x55,0x00,0x04};//fourth UID card
byte Name5[4]={0xBA,0x12,0x02,0x04};//fifth UID card

//if you want the arduino to detect the cards only once
int NumbCard[5];//this array content the number of cards. in my case i have just two cards.
int j=0;        

int const RedLed=6;
int const GreenLed=5;
int const Buzzer=8;

String Name;//user name
long Number;//user number
int n ;//The number of card you want to detect (optional)  

void setup() {
  Serial.begin(9600); // Initialize serial communications with the PC
  SPI.begin();  // Init SPI bus
  mfrc522.PCD_Init(); // Init MFRC522 card
  
  Serial.println("CLEARSHEET");                 // clears starting at row 1
  Serial.println("LABEL,Date,Time,Name,Number");// make four columns (Date,Time,[Name:"user name"]line 48 & 52,[Number:"user number"]line 49 & 53)

  pinMode(RedLed,OUTPUT);
  pinMode(GreenLed,OUTPUT);
  pinMode(Buzzer,OUTPUT);

   }
    
void loop() {
  //look for new card
   if ( ! mfrc522.PICC_IsNewCardPresent()) {
  return;//got to start of loop if there is no card present
 }
 // Select one of the cards
 if ( ! mfrc522.PICC_ReadCardSerial()) {
  return;//if read card serial(0) returns 1, the uid struct contians the ID of the read card.
 }
 
 for (byte i = 0; i < mfrc522.uid.size; i++) {
     card_ID[i]=mfrc522.uid.uidByte[i];

       if(card_ID[i]==Name1[i]){
       Name="Name 1";//user name
       Number=100000;//user number
       j=0;//first number in the NumbCard array : NumbCard[j]
      }
      else if(card_ID[i]==Name2[i]){
       Name="Name 2";//user name
       Number=590000;//user number
       j=1;//first number in the NumbCard array : NumbCard[j]
      }
      else if(card_ID[i]==Name3[i]){
       Name="Name 3";//user name
       Number=690000;//user number
       j=2;//first number in the NumbCard array : NumbCard[j]
      }
      else if(card_ID[i]==Name4[i]){
       Name="Name 4";//user name
       Number=790000;//user number
       j=3;//first number in the NumbCard array : NumbCard[j]
      }
       else if(card_ID[i]==Name5[i]){
       Name="Name 5";//user name
       Number=890000;//user number
       j=4;//first number in the NumbCard array : NumbCard[j]
      }
      else{
          digitalWrite(GreenLed,LOW);
          digitalWrite(RedLed,HIGH);
          goto cont;//go directly to line 85
     }
}
      if(NumbCard[j] == 5){//to check if the card already detect
      //if you want to use LCD
      //Serial.println("Already Exist");
      }
      else{
      NumbCard[j] = 5;//put 1 in the NumbCard array : NumbCard[j]={1,1} to let the arduino know if the card was detecting 
      n++;//(optional)
      Serial.print("DATA,DATE,TIME," + Name);//send the Name to excel
      Serial.print(",");
      Serial.println(Number); //send the Number to excel
      digitalWrite(GreenLed,HIGH);
      digitalWrite(RedLed,LOW);
      digitalWrite(Buzzer,HIGH);
      delay(30);
      digitalWrite(Buzzer,LOW);
      Serial.println("SAVEWORKBOOKAS,Names/WorkNames");
      }
      delay(1000);
cont:
delay(2000);
digitalWrite(GreenLed,LOW);
digitalWrite(RedLed,LOW);


//if you want to close the Excel when all card had detected and save Excel file in Names Folder. in my case i have just 2 card (optional)
//if(n==2){
    
  //  Serial.println("FORCEEXCELQUIT");
 //   }
  }

    

I didn't quite understand your need and your difficulty.
Describe it in more detail so we can help you.

basically My project is like connected to PLX-DAQ, into excel. What I want to happen is when i scan my cards the data name date and time will be shown on excel. it works but only for 1 tag and 1 card. when I try the other cards there is no result. I'm trying to know what was wrong in the coding that made the other cards cannot be scanned. it only scans and delivers the data of name 1 and name 2

You should put these into an array. Any time you make variables with "1", "2", "3" in their names, that should be an array. If they are already arrays, they become a single 2D array;

const byte numNames  = 5;

byte Name[numNames][4] = {
  {0x8B,0xBA,0xC8,0x01},//first UID card
  {0x67,0x1E,0x02,0x04},//second UID card
  {0xA1,0xC7,0x01,0x04},//third UID card
  {0x8E,0x55,0x00,0x04},//fourth UID card
  {0xBA,0x12,0x02,0x04} //fifth UID card
};

I inputted that and when I click upload, it says "conflicting declaration 'string name'

You can use memcmp() function to make the code easier:

  byte n;
  for(n = 0; n < numNames; n++) {
    if (memcmp(card_ID, Name[n], sizeof(card_ID)) == 0) {
      break;
    }
  }
  if (n >= numNames) {
    Serial.println("Card not recognised");
  }
  else {
    Serial.print("Card ");
    Serial.print(n);
    Serial.println(" recognised");

  }

You did it wrong.

If you need more help, try reading the forum guide in the sticky post.

Forum members cannot see the code or the errors in front of you.

I suggest that you first use a simple code to read cards.
There is simple code to read cards in the library examples.
This way you can "debug" whether the problem is with your code or with the cards.

the error part is in this part when I try to upload it

`String Name;//user name`
[/quote]

You have not read the forum guide as I suggested. I will not waste further time on you. Good luck.

Show the complete error.

numNames must increment.

Read the pinned post re 'How to get the most from the forum'. Then follow any instructions given by a helper. Arguing with a helper is counter-productive; if you know enough to argue, you don't need help. So ........

It can't be incremented, it's declared const.

Yes. I was not seeing the obvous. It is the declaration of Name. (sigh)

Yes, in hindsight I should have renamed the 2D array so it did not clash with the String called Name.

Name is not a good variable name for the array anyways: it holds tag IDs, not names.