-1

I want to return 3 columns, A(description), 'D'(hard coded value of D), Q(date)

=query('Detailed Plan'!$A$2:$Q, "select A,'D',Q where D = date)

It returns the following results. Rows 2 and greater are exactly what I want and would be perfect if I didn't get the first row. How do I get a hard coded value into a column without "D"() showing up in the first row?

blank, "D"(), blank
Description, D, date
Description, D, date
Description, D, date

Thanks so much for any help that is provided.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
iroosma
  • 15
  • 1
  • 4

1 Answers1

0

You can use 'label' in the query string.

=query('Detailed Plan'!$A$2:$Q, "select A, D, Q where D = date label A 'Description', D 'Some value', Q 'Date' ", 0)

EDIT: if you don't need headers at all, try

=query('Detailed Plan'!$A$2:$Q, "select A, D, Q where D = date ", 0)
JPV
  • 26,499
  • 4
  • 33
  • 48
  • Thanks so much for your response. This solution did add titles to the columns but my hope is to remove the first row that includes the titles. All I need is the data in row 2 and down. – iroosma Jul 14 '17 at 19:27
  • If you don't want any headers see my updated answer. – JPV Jul 14 '17 at 20:18
  • Thanks for the update. That removed headers but I didn't notice the other change from your first response. Select A, D instead of Select A, 'D'. I need the letter D to show up in the second column. – iroosma Jul 15 '17 at 02:09
  • oh, you want the letter D in every row of the table, right? – JPV Jul 15 '17 at 06:59
  • Then what it the where-part for in your formula? – JPV Jul 15 '17 at 07:00
  • Yes I do want the letter D in the second column. The hope is to get data from column A, hard coded letter D, and data from column Q. – iroosma Jul 17 '17 at 18:44