+ Reply to Thread
Results 1 to 5 of 5

Dragging vertical formulas referencing horizontal cells

  1. #1
    Registered User
    Join Date
    06-17-2020
    Location
    Canada
    MS-Off Ver
    2019
    Posts
    27

    Dragging vertical formulas referencing horizontal cells

    Hi there, I’m looking to get help with 2 formulas. The issue with both is that I want to drag down the formula VERTICALLY, but the reference cells are horizontal.

    Both formulas are for the “Summary Sold” tab.

    First formula for Column B:
    =COUNTIFS('BLSPLS Menu'!C12:C13,”*”,’BLSPLS Menu'!C12:C13,”<> ")

    The formula I’m looking to create here is that I want it to count the number of cells from C12:C13 in BLSPLS Menu tab that have text in it.

    Cell B3 in Summary Sold returns the correct value 2. HOWEVER, the issue I’m having down is dragging down the formula to the rest of the column, as the C12:C13 value is shifting incorrectly.

    I’ve tried adding in $ to lock the values, but that doesn’t seem to help… any ideas on what other formulas I’ll need to do and how I can integrate it? I’ve read online something about INDEX?? But not sure if that’s applicable here



    Second Formula for Column A:

    =TRANSPOSE(CONCATENATE(INDEX('BLSPLS Menu'!$C$12:$G$13,1,1),INDEX('BLSPLS Menu'!$C$12:$G$13,2,1)))

    The formula I’m looking to create here is that I want it to concatenate rows 12-13 for each column into the cell in Summary Sold.

    For example, Program abc in Summary Sold Tab has spit out the correct. Value in cell C3. However, when I drag that formula down, again it does not appear to work.

    For reference, Program def should combine the text from D12:D13, but it does not.

    Help would be appreciated with the formulas!!! THANK YOU!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    490

    Re: Dragging vertical formulas referencing horizontal cells

    For the first formula try instead in F3 (you write B3 above): =COUNTIFS(INDEX('BLSPLS Menu'!$C$13:$G$14,,ROWS(F$3:F3)),"*",INDEX('BLSPLS Menu'!$C$13:$G$14,,ROWS(F$3:F3)),"<> ")

    And in G3 (your write C3 above): =CONCATENATE(INDEX('BLSPLS Menu'!$C$12:$G$12,,ROWS(G$3:G3)),INDEX('BLSPLS Menu'!$C$13:$G$13,,ROWS(G$3:G3)))

  3. #3
    Registered User
    Join Date
    06-17-2020
    Location
    Canada
    MS-Off Ver
    2019
    Posts
    27

    Re: Dragging vertical formulas referencing horizontal cells

    Thanks so much! Both formulas worked

    Just some general questions if you wouldn't mind explaining
    - what are the two commas for?
    - Are you able to elaborate a bit further on the Index formula you used, and specifically what the addition of the ROWS does? I personally have never used it before (am still new to excel).

    Thanks so much again!

  4. #4
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    490

    Re: Dragging vertical formulas referencing horizontal cells

    If you omit the row or column arguments for INDEX, or set it to zero, it returns the entire row/column.
    I prefer to just omit it (instead of zero) as it saves me one character.
    The first comma is for the row argument, the second comma then is for the column argument; and since you want to move to the right, you enter the counter (ROWS()) into the column argument and don't need anything for the row argument.

    ROWS is just a counter, in F3 this is 1, in F4 this is 2 etc.
    I use the counter in the same cell that the formulas is in, i.e. the reference for the counter in F3 refers to F3 for two reasons:
    - it's kinda fancy, and at first a bit counterintuitive, that a formula that refers to its own cell does not create a circularity problem
    - it avoids from the formula being corrupted; e.g. if you use e.g. cell A1 for the counter and then delete cell A1, the formula in F3 will no longer work (showing a #REF! error where the reference to A1 was); referring to its own cell instead, avoids this from happening.

    Hope this helps.

    Regards

  5. #5
    Registered User
    Join Date
    06-17-2020
    Location
    Canada
    MS-Off Ver
    2019
    Posts
    27

    Re: Dragging vertical formulas referencing horizontal cells

    Thanks for the explanation & help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 02-01-2016, 08:25 PM
  2. [SOLVED] how to reference horizontal rows to vertical columns by dragging with an equation
    By karim.zheng in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-01-2015, 12:05 PM
  3. Dragging formulas which include vertical and horizantal variables
    By pmars88 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-19-2015, 03:38 PM
  4. [SOLVED] Horizontal to vertical dragging of formulas...
    By Finalfrontier1976 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2013, 09:39 AM
  5. Cell Referencing - Vertical to Horizontal
    By Prabhjot Kaur in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-09-2013, 08:17 PM
  6. Horizontal dates put in vertical formulas
    By bajo671 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-29-2012, 03:17 PM
  7. Copying formulas from horizontal to vertical
    By pmd in forum Excel General
    Replies: 6
    Last Post: 09-06-2011, 11:38 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1