Forum Discussion

lorie3345's avatar
lorie3345
Copper Contributor
Nov 05, 2020

help with IF Formula

I am very new to excel so please bare with me 🙂

 

I'm trying to create an IF formula to do the following:

 

if "x" appears in "selection" fill in the date from column "a" "b" "c" into cell "1" "2" "3"

 

Basically, I need a certain number found in a big selection. once it is found, I need the total data from certain columns to fill in corresponding cells above the original selection

 

idea's on how to write the formula?

20 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    lorie3345 

    Better if you provide small sample file to illustrate the question, perhaps it could be done without IF().

    • lorie3345's avatar
      lorie3345
      Copper Contributor

      SergeiBaklan I attached a sample

      what needs to happen is:

      first, the formula needs to find one of the specific card numbers (lets go with 123 for now) from the below selection. 

      then, D4 needs to display the total value located in column Z (formula needs to add all GST values for each row which has card number 123)

      E4 displays the total column AA, F4 displays the total from column AB and finally, G4 displays the total litres from column Q

       

      Basically, I need it to search out specific cards number, add all rows which contain that card number and fill in the specific cells with the specific information I need for my report. This report will be calculated on a monthly basis

      I will need to repeat the formula for each card number but the rest will be staying the same.

      The information will then be auto-populating a master summary worksheet to get year to date totals based on the sum of the other monthly worksheets

       

      Does this make sense or is this impossible to do?

       

  • PReagan's avatar
    PReagan
    Bronze Contributor

    Hello lorie3345,

     

    Unfortunately, your description is not completely clear to me. In general, your formula would look something like this:

    =IF(A1="X", "Date from cell", "Not X")

     

    • lorie3345's avatar
      lorie3345
      Copper Contributor

      PReagan 

      I attached a sample

      what needs to happen is:

      first, the formula needs to find one of the specific card numbers (lets go with 123 for now) from the below selection. 

      then, D4 needs to display the total value located in column Z (formula needs to add all GST values for each row which has card number 123)

      E4 displays the total column AA, F4 displays the total from column AB and finally, G4 displays the total litres from column Q

       

      Basically, I need it to search out specific cards number, add all rows which contain that card number and fill in the specific cells with the specific information I need for my report. This report will be calculated on a monthly basis

      I will need to repeat the formula for each card number but the rest will be staying the same.

      The information will then be auto-populating a master summary worksheet to get year to date totals based on the sum of the other monthly worksheets

       

      Does this make sense or is this impossible to do?

       

Resources